Changeset 3228
- Timestamp:
- 03/28/10 18:05:58 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs
r2949 r3228 35 35 [Content(typeof(ItemArray<>), true)] 36 36 [Content(typeof(IObservableArray<>), false)] 37 public partial class ItemArrayView<T> : ContentView where T : class, IItem {37 public partial class ItemArrayView<T> : AsynchronousContentView where T : class, IItem { 38 38 /// <summary> 39 39 /// Gets or sets the scope whose variables to represent visually. -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
r2949 r3228 31 31 [Content(typeof(ItemCollection<>), true)] 32 32 [Content(typeof(IObservableCollection<>), false)] 33 public partial class ItemCollectionView<T> : ContentView where T : class, IItem {33 public partial class ItemCollectionView<T> : AsynchronousContentView where T : class, IItem { 34 34 public new IObservableCollection<T> Content { 35 35 get { return (IObservableCollection<T>)base.Content; } -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs
r2949 r3228 35 35 [Content(typeof(ItemList<>), true)] 36 36 [Content(typeof(IObservableList<>), false)] 37 public partial class ItemListView<T> : ContentView where T : class, IItem {37 public partial class ItemListView<T> : AsynchronousContentView where T : class, IItem { 38 38 /// <summary> 39 39 /// Gets or sets the scope whose variables to represent visually. -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemView.cs
r2961 r3228 23 23 using HeuristicLab.MainForm; 24 24 using HeuristicLab.MainForm.WindowsForms; 25 using System.Threading; 25 26 26 27 namespace HeuristicLab.Core.Views { … … 31 32 [Content(typeof(Item), false)] 32 33 [Content(typeof(IItem), false)] 33 public partial class ItemView : ContentView {34 public partial class ItemView : AsynchronousContentView { 34 35 public new IItem Content { 35 36 get { return (IItem)base.Content; } … … 64 65 protected new void Invoke(Delegate method) { 65 66 // enforce context switch to improve GUI response time 66 System.Threading.Thread.Sleep(0); 67 67 IAsyncResult res = base.BeginInvoke(method); 68 ThreadPool.RegisterWaitForSingleObject(res.AsyncWaitHandle, 69 new WaitOrTimerCallback((x, b) => { EndInvoke(res); }), 70 null, -1, true); 68 71 // prevent blocking of worker thread in Invoke, if the control is disposed 69 IAsyncResult result = BeginInvoke(method); 70 while ((!result.AsyncWaitHandle.WaitOne(100, false)) && (!IsDisposed)) { } 71 if (!IsDisposed) EndInvoke(result); 72 //IAsyncResult result = BeginInvoke(method); 73 //while ((!result.AsyncWaitHandle.WaitOne(100, false)) && (!IsDisposed)) { 74 // System.Threading.Thread.Sleep(0); 75 //} 76 //if (!IsDisposed) EndInvoke(result); 72 77 } 73 78 /// <summary> … … 78 83 protected new void Invoke(Delegate method, params object[] args) { 79 84 // enforce context switch to improve GUI response time 80 System.Threading.Thread.Sleep(0); 85 IAsyncResult res = base.BeginInvoke(method, args); 86 ThreadPool.RegisterWaitForSingleObject(res.AsyncWaitHandle, 87 new WaitOrTimerCallback((x, b) => { EndInvoke(res); }), 88 null, -1, true); 89 //base.Invoke(method, args); 90 //System.Threading.Thread.Sleep(0); 81 91 82 // prevent blocking of worker thread in Invoke, if the control is disposed83 IAsyncResult result = BeginInvoke(method, args);84 while ((!result.AsyncWaitHandle.WaitOne(100, false)) && (!IsDisposed)) { }85 if (!IsDisposed) EndInvoke(result);92 //// prevent blocking of worker thread in Invoke, if the control is disposed 93 //IAsyncResult result = BeginInvoke(method, args); 94 //while ((!result.AsyncWaitHandle.WaitOne(100, false)) && (!IsDisposed)) { } 95 //if (!IsDisposed) EndInvoke(result); 86 96 } 87 97 } -
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleArrayView.cs
r3048 r3228 31 31 [View("StringConvertibleArray View")] 32 32 [Content(typeof(IStringConvertibleArray), true)] 33 public partial class StringConvertibleArrayView : ContentView {33 public partial class StringConvertibleArrayView : AsynchronousContentView { 34 34 public new IStringConvertibleArray Content { 35 35 get { return (IStringConvertibleArray)base.Content; } -
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r3048 r3228 31 31 [View("StringConvertibleMatrix View")] 32 32 [Content(typeof(IStringConvertibleMatrix), true)] 33 public partial class StringConvertibleMatrixView : ContentView {33 public partial class StringConvertibleMatrixView : AsynchronousContentView { 34 34 public new IStringConvertibleMatrix Content { 35 35 get { return (IStringConvertibleMatrix)base.Content; } -
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleValueView.cs
r3048 r3228 29 29 [View("StringConvertibleValue View")] 30 30 [Content(typeof(IStringConvertibleValue), true)] 31 public partial class StringConvertibleValueView : ContentView {31 public partial class StringConvertibleValueView : AsynchronousContentView { 32 32 public new IStringConvertibleValue Content { 33 33 get { return (IStringConvertibleValue)base.Content; }
Note: See TracChangeset
for help on using the changeset viewer.