Changeset 2713 for trunk/sources/HeuristicLab.Core.Views/3.3
- Timestamp:
- 01/29/10 01:44:57 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Core.Views/3.3
- Files:
-
- 3 deleted
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.Designer.cs
r2687 r2713 87 87 | System.Windows.Forms.AnchorStyles.Right))); 88 88 this.operatorGraphView.Caption = "Operator Graph"; 89 this.operatorGraphView.Item = null;90 89 this.operatorGraphView.Location = new System.Drawing.Point(6, 6); 91 90 this.operatorGraphView.Name = "operatorGraphView"; 92 this.operatorGraphView.Object = null;93 this.operatorGraphView.OperatorGraph = null;94 91 this.operatorGraphView.Size = new System.Drawing.Size(782, 573); 95 92 this.operatorGraphView.TabIndex = 0; … … 101 98 | System.Windows.Forms.AnchorStyles.Right))); 102 99 this.scopeView.Caption = "Scope"; 103 this.scopeView.Item = null;104 100 this.scopeView.Location = new System.Drawing.Point(6, 6); 105 101 this.scopeView.Name = "scopeView"; 106 this.scopeView.Object = null;107 this.scopeView.Scope = null;108 102 this.scopeView.Size = new System.Drawing.Size(782, 573); 109 103 this.scopeView.TabIndex = 0; -
trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.cs
r2676 r2713 43 43 /// </summary> 44 44 /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="EditorBase"/>.</remarks> 45 public Engine Engine{46 get { return (Engine) Item; }47 set { base. Item= value; }45 public new Engine Content { 46 get { return (Engine)base.Content; } 47 set { base.Content = value; } 48 48 } 49 49 … … 56 56 public EngineView(Engine engine) 57 57 : this() { 58 Engine= engine;58 Content = engine; 59 59 } 60 60 … … 63 63 /// </summary> 64 64 /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 65 protected override void Deregister ObjectEvents() {66 Engine.OperatorGraphChanged -= new EventHandler(Engine_OperatorGraphChanged);67 Engine.Initialized -= new EventHandler(Engine_Initialized);68 Engine.Started -= new EventHandler(Engine_Started);69 Engine.Stopped -= new EventHandler(Engine_Stopped);70 Engine.ExecutionTimeChanged -= new EventHandler(Engine_ExecutionTimeChanged);71 Engine.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred);72 base.Deregister ObjectEvents();65 protected override void DeregisterContentEvents() { 66 Content.OperatorGraphChanged -= new EventHandler(Content_OperatorGraphChanged); 67 Content.Initialized -= new EventHandler(Content_Initialized); 68 Content.Started -= new EventHandler(Content_Started); 69 Content.Stopped -= new EventHandler(Content_Stopped); 70 Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged); 71 Content.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred); 72 base.DeregisterContentEvents(); 73 73 } 74 74 … … 77 77 /// </summary> 78 78 /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 79 protected override void Register ObjectEvents() {80 base.Register ObjectEvents();81 Engine.OperatorGraphChanged += new EventHandler(Engine_OperatorGraphChanged);82 Engine.Initialized += new EventHandler(Engine_Initialized);83 Engine.Started += new EventHandler(Engine_Started);84 Engine.Stopped += new EventHandler(Engine_Stopped);85 Engine.ExecutionTimeChanged += new EventHandler(Engine_ExecutionTimeChanged);86 Engine.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred);79 protected override void RegisterContentEvents() { 80 base.RegisterContentEvents(); 81 Content.OperatorGraphChanged += new EventHandler(Content_OperatorGraphChanged); 82 Content.Initialized += new EventHandler(Content_Initialized); 83 Content.Started += new EventHandler(Content_Started); 84 Content.Stopped += new EventHandler(Content_Stopped); 85 Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged); 86 Content.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred); 87 87 } 88 88 … … 91 91 /// </summary> 92 92 /// <remarks>Calls <see cref="EditorBase.UpdateControls"/> of base class <see cref="EditorBase"/>.</remarks> 93 protected override void On ObjectChanged() {94 base.On ObjectChanged();93 protected override void OnContentChanged() { 94 base.OnContentChanged(); 95 95 stopButton.Enabled = false; 96 if ( Engine== null) {96 if (Content == null) { 97 97 operatorGraphView.Enabled = false; 98 98 scopeView.Enabled = false; … … 101 101 executionTimeTextBox.Enabled = false; 102 102 } else { 103 operatorGraphView. OperatorGraph = Engine.OperatorGraph;104 scopeView. Scope = Engine.GlobalScope;105 startButton.Enabled = ! Engine.Finished;103 operatorGraphView.Content = Content.OperatorGraph; 104 scopeView.Content = Content.GlobalScope; 105 startButton.Enabled = !Content.Finished; 106 106 resetButton.Enabled = true; 107 107 UpdateExecutionTimeTextBox(); … … 110 110 } 111 111 112 #region EngineEvents113 protected virtual void Engine_OperatorGraphChanged(object sender, EventArgs e) {112 #region Content Events 113 protected virtual void Content_OperatorGraphChanged(object sender, EventArgs e) { 114 114 if (InvokeRequired) 115 Invoke(new EventHandler( Engine_OperatorGraphChanged), sender, e);115 Invoke(new EventHandler(Content_OperatorGraphChanged), sender, e); 116 116 else 117 operatorGraphView. OperatorGraph = Engine.OperatorGraph;117 operatorGraphView.Content = Content.OperatorGraph; 118 118 } 119 protected virtual void Engine_Initialized(object sender, EventArgs e) {119 protected virtual void Content_Initialized(object sender, EventArgs e) { 120 120 if (InvokeRequired) 121 Invoke(new EventHandler( Engine_Initialized), sender, e);121 Invoke(new EventHandler(Content_Initialized), sender, e); 122 122 else { 123 123 operatorGraphView.Enabled = true; 124 124 scopeView.Enabled = true; 125 startButton.Enabled = ! Engine.Finished;125 startButton.Enabled = !Content.Finished; 126 126 stopButton.Enabled = false; 127 127 resetButton.Enabled = true; … … 129 129 } 130 130 } 131 protected virtual void Engine_Started(object sender, EventArgs e) {131 protected virtual void Content_Started(object sender, EventArgs e) { 132 132 executionTimeCounter = 0; 133 133 if (InvokeRequired) 134 Invoke(new EventHandler( Engine_Started), sender, e);134 Invoke(new EventHandler(Content_Started), sender, e); 135 135 else { 136 136 operatorGraphView.Enabled = false; … … 142 142 } 143 143 } 144 protected virtual void Engine_Stopped(object sender, EventArgs e) {144 protected virtual void Content_Stopped(object sender, EventArgs e) { 145 145 if (InvokeRequired) 146 Invoke(new EventHandler( Engine_Stopped), sender, e);146 Invoke(new EventHandler(Content_Stopped), sender, e); 147 147 else { 148 148 operatorGraphView.Enabled = true; 149 149 scopeView.Enabled = true; 150 startButton.Enabled = ! Engine.Finished;150 startButton.Enabled = !Content.Finished; 151 151 stopButton.Enabled = false; 152 152 resetButton.Enabled = true; … … 154 154 } 155 155 } 156 protected virtual void Engine_ExecutionTimeChanged(object sender, EventArgs e) {156 protected virtual void Content_ExecutionTimeChanged(object sender, EventArgs e) { 157 157 executionTimeCounter++; 158 if ((executionTimeCounter == 100) || ! Engine.Running) {158 if ((executionTimeCounter == 100) || !Content.Running) { 159 159 executionTimeCounter = 0; 160 160 UpdateExecutionTimeTextBox(); 161 161 } 162 162 } 163 protected virtual void Engine_ExceptionOccurred(object sender, EventArgs<Exception> e) {163 protected virtual void Content_ExceptionOccurred(object sender, EventArgs<Exception> e) { 164 164 if (InvokeRequired) 165 Invoke(new EventHandler<EventArgs<Exception>>( Engine_ExceptionOccurred), sender, e);165 Invoke(new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred), sender, e); 166 166 else 167 167 Auxiliary.ShowErrorMessageBox(e.Value); … … 171 171 #region Button events 172 172 protected virtual void startButton_Click(object sender, EventArgs e) { 173 Engine.Start();173 Content.Start(); 174 174 } 175 175 protected virtual void stopButton_Click(object sender, EventArgs e) { 176 Engine.Stop();176 Content.Stop(); 177 177 } 178 178 protected virtual void resetButton_Click(object sender, EventArgs e) { 179 Engine.Initialize();179 Content.Initialize(); 180 180 } 181 181 #endregion … … 186 186 Invoke(new Action(UpdateExecutionTimeTextBox)); 187 187 else 188 executionTimeTextBox.Text = Engine.ExecutionTime.ToString();188 executionTimeTextBox.Text = Content.ExecutionTime.ToString(); 189 189 } 190 190 #endregion -
trunk/sources/HeuristicLab.Core.Views/3.3/HeuristicLab.Core.Views-3.3.csproj
r2684 r2713 83 83 <DependentUpon>NamedItemView.cs</DependentUpon> 84 84 </Compile> 85 <Compile Include="ObjectView.cs">86 <SubType>UserControl</SubType>87 </Compile>88 <Compile Include="ObjectView.Designer.cs">89 <DependentUpon>ObjectView.cs</DependentUpon>90 </Compile>91 85 <Compile Include="OperatorGraphView.cs"> 92 86 <SubType>UserControl</SubType> … … 167 161 <DependentUpon>ItemListView.cs</DependentUpon> 168 162 </Compile> 169 <Compile Include="IObjectView.cs" />170 163 <Compile Include="ParameterView.cs"> 171 164 <SubType>UserControl</SubType> -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.Designer.cs
r2676 r2713 194 194 this.viewHost.Location = new System.Drawing.Point(6, 19); 195 195 this.viewHost.Name = "viewHost"; 196 this.viewHost. Object = null;196 this.viewHost.Content = null; 197 197 this.viewHost.Size = new System.Drawing.Size(254, 310); 198 198 this.viewHost.TabIndex = 0; -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
r2708 r2713 30 30 using HeuristicLab.Common; 31 31 using HeuristicLab.MainForm; 32 using HeuristicLab.MainForm.WindowsForms; 32 33 33 34 namespace HeuristicLab.Core.Views { 34 public partial class ItemCollectionView<T> : ObjectView where T : class, IItem {35 public IObservableCollection<T> ItemCollection{36 get { return (IObservableCollection<T>) Object; }37 set { base. Object = value; }35 public partial class ItemCollectionView<T> : ContentView where T : class, IItem { 36 public new IObservableCollection<T> Content { 37 get { return (IObservableCollection<T>)base.Content; } 38 set { base.Content = value; } 38 39 } 39 40 … … 47 48 } 48 49 49 protected override void Deregister ObjectEvents() {50 ItemCollection.ItemsAdded -= new CollectionItemsChangedEventHandler<T>(ItemCollection_ItemsAdded);51 ItemCollection.ItemsRemoved -= new CollectionItemsChangedEventHandler<T>(ItemCollection_ItemsRemoved);52 ItemCollection.CollectionReset -= new CollectionItemsChangedEventHandler<T>(ItemCollection_CollectionReset);53 base.Deregister ObjectEvents();54 } 55 protected override void Register ObjectEvents() {56 base.Register ObjectEvents();57 ItemCollection.ItemsAdded += new CollectionItemsChangedEventHandler<T>(ItemCollection_ItemsAdded);58 ItemCollection.ItemsRemoved += new CollectionItemsChangedEventHandler<T>(ItemCollection_ItemsRemoved);59 ItemCollection.CollectionReset += new CollectionItemsChangedEventHandler<T>(ItemCollection_CollectionReset);60 } 61 62 protected override void On ObjectChanged() {63 base.On ObjectChanged();50 protected override void DeregisterContentEvents() { 51 Content.ItemsAdded -= new CollectionItemsChangedEventHandler<T>(Content_ItemsAdded); 52 Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<T>(Content_ItemsRemoved); 53 Content.CollectionReset -= new CollectionItemsChangedEventHandler<T>(Content_CollectionReset); 54 base.DeregisterContentEvents(); 55 } 56 protected override void RegisterContentEvents() { 57 base.RegisterContentEvents(); 58 Content.ItemsAdded += new CollectionItemsChangedEventHandler<T>(Content_ItemsAdded); 59 Content.ItemsRemoved += new CollectionItemsChangedEventHandler<T>(Content_ItemsRemoved); 60 Content.CollectionReset += new CollectionItemsChangedEventHandler<T>(Content_CollectionReset); 61 } 62 63 protected override void OnContentChanged() { 64 base.OnContentChanged(); 64 65 Caption = "Item Collection"; 65 66 while (itemsListView.Items.Count > 0) RemoveListViewItem(itemsListView.Items[0]); 66 67 itemsListView.Enabled = false; 67 68 detailsGroupBox.Enabled = false; 68 viewHost. Object = null;69 viewHost.Content = null; 69 70 addButton.Enabled = false; 70 71 sortAscendingButton.Enabled = false; … … 72 73 removeButton.Enabled = false; 73 74 74 if ( ItemCollection!= null) {75 Caption += " (" + ItemCollection.GetType().Name + ")";75 if (Content != null) { 76 Caption += " (" + Content.GetType().Name + ")"; 76 77 itemsListView.Enabled = true; 77 addButton.Enabled = ! ItemCollection.IsReadOnly;78 foreach (T item in ItemCollection)78 addButton.Enabled = !Content.IsReadOnly; 79 foreach (T item in Content) 79 80 AddListViewItem(CreateListViewItem(item)); 80 81 sortAscendingButton.Enabled = itemsListView.Items.Count > 0; … … 130 131 #region ListView Events 131 132 protected virtual void itemsListView_SelectedIndexChanged(object sender, EventArgs e) { 132 removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && ! ItemCollection.IsReadOnly;133 removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && !Content.IsReadOnly; 133 134 if (itemsListView.SelectedItems.Count == 1) { 134 135 T item = (T)itemsListView.SelectedItems[0].Tag; 135 viewHost. Object = item;136 viewHost.Content = item; 136 137 detailsGroupBox.Enabled = true; 137 138 } else { 138 viewHost. Object = null;139 viewHost.Content = null; 139 140 detailsGroupBox.Enabled = false; 140 141 } … … 146 147 protected virtual void itemsListView_KeyDown(object sender, KeyEventArgs e) { 147 148 if (e.KeyCode == Keys.Delete) { 148 if ((itemsListView.SelectedItems.Count > 0) && ! ItemCollection.IsReadOnly) {149 if ((itemsListView.SelectedItems.Count > 0) && !Content.IsReadOnly) { 149 150 foreach (ListViewItem item in itemsListView.SelectedItems) 150 ItemCollection.Remove((T)item.Tag);151 Content.Remove((T)item.Tag); 151 152 } 152 153 } … … 165 166 data.SetData("Type", item.GetType()); 166 167 data.SetData("Value", item); 167 if ( ItemCollection.IsReadOnly) {168 if (Content.IsReadOnly) { 168 169 DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link); 169 170 } else { 170 171 DragDropEffects result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move); 171 172 if ((result & DragDropEffects.Move) == DragDropEffects.Move) 172 ItemCollection.Remove(item);173 Content.Remove(item); 173 174 } 174 175 } … … 176 177 e.Effect = DragDropEffects.None; 177 178 Type type = e.Data.GetData("Type") as Type; 178 if ((! ItemCollection.IsReadOnly) && (type != null) && (typeof(T).IsAssignableFrom(type))) {179 if ((!Content.IsReadOnly) && (type != null) && (typeof(T).IsAssignableFrom(type))) { 179 180 if ((e.KeyState & 8) == 8) e.Effect = DragDropEffects.Copy; // CTRL key 180 181 else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move; // SHIFT key … … 188 189 T item = e.Data.GetData("Value") as T; 189 190 if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) item = (T)item.Clone(); 190 ItemCollection.Add(item);191 Content.Add(item); 191 192 } 192 193 } … … 197 198 T item = CreateItem(); 198 199 if (item != null) 199 ItemCollection.Add(item);200 Content.Add(item); 200 201 } 201 202 protected virtual void sortAscendingButton_Click(object sender, EventArgs e) { … … 208 209 if (itemsListView.SelectedItems.Count > 0) { 209 210 foreach (ListViewItem item in itemsListView.SelectedItems) 210 ItemCollection.Remove((T)item.Tag);211 Content.Remove((T)item.Tag); 211 212 itemsListView.SelectedItems.Clear(); 212 213 } … … 214 215 #endregion 215 216 216 #region ItemCollectionEvents217 protected virtual void ItemCollection_ItemsAdded(object sender, CollectionItemsChangedEventArgs<T> e) {218 if (InvokeRequired) 219 Invoke(new CollectionItemsChangedEventHandler<T>( ItemCollection_ItemsAdded), sender, e);217 #region Content Events 218 protected virtual void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<T> e) { 219 if (InvokeRequired) 220 Invoke(new CollectionItemsChangedEventHandler<T>(Content_ItemsAdded), sender, e); 220 221 else 221 222 foreach (T item in e.Items) 222 223 AddListViewItem(CreateListViewItem(item)); 223 224 } 224 protected virtual void ItemCollection_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<T> e) {225 if (InvokeRequired) 226 Invoke(new CollectionItemsChangedEventHandler<T>( ItemCollection_ItemsRemoved), sender, e);225 protected virtual void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<T> e) { 226 if (InvokeRequired) 227 Invoke(new CollectionItemsChangedEventHandler<T>(Content_ItemsRemoved), sender, e); 227 228 else { 228 229 foreach (T item in e.Items) { … … 234 235 } 235 236 } 236 protected virtual void ItemCollection_CollectionReset(object sender, CollectionItemsChangedEventArgs<T> e) {237 if (InvokeRequired) 238 Invoke(new CollectionItemsChangedEventHandler<T>( ItemCollection_CollectionReset), sender, e);237 protected virtual void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<T> e) { 238 if (InvokeRequired) 239 Invoke(new CollectionItemsChangedEventHandler<T>(Content_CollectionReset), sender, e); 239 240 else { 240 241 foreach (T item in e.OldItems) { -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.Designer.cs
r2676 r2713 192 192 this.viewHost.Location = new System.Drawing.Point(6, 19); 193 193 this.viewHost.Name = "viewHost"; 194 this.viewHost. Object = null;194 this.viewHost.Content = null; 195 195 this.viewHost.Size = new System.Drawing.Size(271, 269); 196 196 this.viewHost.TabIndex = 0; -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs
r2708 r2713 30 30 using HeuristicLab.Common; 31 31 using HeuristicLab.MainForm; 32 using HeuristicLab.MainForm.WindowsForms; 32 33 33 34 namespace HeuristicLab.Core.Views { … … 35 36 /// The visual representation of all variables in a specified scope. 36 37 /// </summary> 37 public partial class ItemListView<T> : ObjectView where T : class, IItem {38 public partial class ItemListView<T> : ContentView where T : class, IItem { 38 39 /// <summary> 39 40 /// Gets or sets the scope whose variables to represent visually. … … 41 42 /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>. 42 43 /// No won data storage present.</remarks> 43 public IObservableList<T> ItemList {44 get { return (IObservableList<T>) Object; }45 set { base. Object = value; }44 public new IObservableList<T> Content { 45 get { return (IObservableList<T>)base.Content; } 46 set { base.Content = value; } 46 47 } 47 48 … … 62 63 /// </summary> 63 64 /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 64 protected override void Deregister ObjectEvents() {65 ItemList.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsAdded);66 ItemList.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsRemoved);67 ItemList.ItemsReplaced -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsReplaced);68 ItemList.ItemsMoved -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsMoved);69 ItemList.CollectionReset -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_CollectionReset);70 base.Deregister ObjectEvents();65 protected override void DeregisterContentEvents() { 66 Content.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsAdded); 67 Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsRemoved); 68 Content.ItemsReplaced -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsReplaced); 69 Content.ItemsMoved -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsMoved); 70 Content.CollectionReset -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_CollectionReset); 71 base.DeregisterContentEvents(); 71 72 } 72 73 … … 75 76 /// </summary> 76 77 /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 77 protected override void Register ObjectEvents() {78 base.Register ObjectEvents();79 ItemList.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsAdded);80 ItemList.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsRemoved);81 ItemList.ItemsReplaced += new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsReplaced);82 ItemList.ItemsMoved += new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_ItemsMoved);83 ItemList.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<T>>(ItemList_CollectionReset);84 } 85 86 protected override void On ObjectChanged() {87 base.On ObjectChanged();78 protected override void RegisterContentEvents() { 79 base.RegisterContentEvents(); 80 Content.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsAdded); 81 Content.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsRemoved); 82 Content.ItemsReplaced += new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsReplaced); 83 Content.ItemsMoved += new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsMoved); 84 Content.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_CollectionReset); 85 } 86 87 protected override void OnContentChanged() { 88 base.OnContentChanged(); 88 89 Caption = "Item List"; 89 90 while (itemsListView.Items.Count > 0) RemoveListViewItem(itemsListView.Items[0]); 90 91 itemsListView.Enabled = false; 91 92 detailsGroupBox.Enabled = false; 92 viewHost. Object = null;93 viewHost.Content = null; 93 94 addButton.Enabled = false; 94 95 moveUpButton.Enabled = false; … … 96 97 removeButton.Enabled = false; 97 98 98 if ( ItemList != null) {99 Caption += " (" + ItemList.GetType().Name + ")";99 if (Content != null) { 100 Caption += " (" + Content.GetType().Name + ")"; 100 101 itemsListView.Enabled = true; 101 addButton.Enabled = ! ItemList.IsReadOnly;102 foreach (T item in ItemList)102 addButton.Enabled = !Content.IsReadOnly; 103 foreach (T item in Content) 103 104 AddListViewItem(CreateListViewItem(item)); 104 105 } … … 150 151 moveUpButton.Enabled = itemsListView.SelectedItems.Count == 1 && 151 152 itemsListView.SelectedIndices[0] != 0 && 152 ! ItemList.IsReadOnly;153 !Content.IsReadOnly; 153 154 moveDownButton.Enabled = itemsListView.SelectedItems.Count == 1 && 154 155 itemsListView.SelectedIndices[0] != itemsListView.Items.Count - 1 && 155 ! ItemList.IsReadOnly;156 !Content.IsReadOnly; 156 157 removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && 157 ! ItemList.IsReadOnly;158 !Content.IsReadOnly; 158 159 159 160 if (itemsListView.SelectedItems.Count == 1) { 160 161 T item = (T)itemsListView.SelectedItems[0].Tag; 161 viewHost. Object = item;162 viewHost.Content = item; 162 163 detailsGroupBox.Enabled = true; 163 164 } else { 164 viewHost. Object = null;165 viewHost.Content = null; 165 166 detailsGroupBox.Enabled = false; 166 167 } … … 175 176 protected virtual void itemsListView_KeyDown(object sender, KeyEventArgs e) { 176 177 if (e.KeyCode == Keys.Delete) { 177 if ((itemsListView.SelectedItems.Count > 0) && ! ItemList.IsReadOnly) {178 if ((itemsListView.SelectedItems.Count > 0) && !Content.IsReadOnly) { 178 179 foreach (ListViewItem item in itemsListView.SelectedItems) 179 ItemList.RemoveAt(item.Index);180 Content.RemoveAt(item.Index); 180 181 } 181 182 } … … 196 197 data.SetData("Type", item.GetType()); 197 198 data.SetData("Value", item); 198 if ( ItemList.IsReadOnly) {199 if (Content.IsReadOnly) { 199 200 DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link); 200 201 } else { 201 202 DragDropEffects result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move); 202 203 if ((result & DragDropEffects.Move) == DragDropEffects.Move) 203 ItemList.RemoveAt(listViewItem.Index);204 Content.RemoveAt(listViewItem.Index); 204 205 } 205 206 } … … 207 208 e.Effect = DragDropEffects.None; 208 209 Type type = e.Data.GetData("Type") as Type; 209 if ((! ItemList.IsReadOnly) && (type != null) && (typeof(T).IsAssignableFrom(type))) {210 if ((!Content.IsReadOnly) && (type != null) && (typeof(T).IsAssignableFrom(type))) { 210 211 if ((e.KeyState & 8) == 8) e.Effect = DragDropEffects.Copy; // CTRL key 211 212 else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move; // SHIFT key … … 222 223 Point p = itemsListView.PointToClient(new Point(e.X, e.Y)); 223 224 ListViewItem listViewItem = itemsListView.GetItemAt(p.X, p.Y); 224 if (listViewItem != null) ItemList.Insert(listViewItem.Index, item);225 else ItemList.Add(item);225 if (listViewItem != null) Content.Insert(listViewItem.Index, item); 226 else Content.Add(item); 226 227 } 227 228 } … … 232 233 T item = CreateItem(); 233 234 if (item != null) 234 ItemList.Add(item);235 Content.Add(item); 235 236 } 236 237 protected virtual void moveUpButton_Click(object sender, EventArgs e) { 237 238 if (itemsListView.SelectedItems.Count == 1) { 238 239 int index = itemsListView.SelectedIndices[0]; 239 T item = ItemList[index - 1];240 ItemList[index - 1] = ItemList[index];240 T item = Content[index - 1]; 241 Content[index - 1] = Content[index]; 241 242 itemsListView.Items[index].Selected = false; 242 243 itemsListView.Items[index - 1].Selected = true; 243 ItemList[index] = item;244 Content[index] = item; 244 245 } 245 246 } … … 247 248 if (itemsListView.SelectedItems.Count == 1) { 248 249 int index = itemsListView.SelectedIndices[0]; 249 T item = ItemList[index + 1];250 ItemList[index + 1] = ItemList[index];250 T item = Content[index + 1]; 251 Content[index + 1] = Content[index]; 251 252 itemsListView.Items[index].Selected = false; 252 253 itemsListView.Items[index + 1].Selected = true; 253 ItemList[index] = item;254 Content[index] = item; 254 255 } 255 256 } … … 257 258 if (itemsListView.SelectedItems.Count > 0) { 258 259 foreach (ListViewItem item in itemsListView.SelectedItems) 259 ItemList.RemoveAt(item.Index);260 Content.RemoveAt(item.Index); 260 261 } 261 262 } 262 263 #endregion 263 264 264 #region NamedItemCollectionEvents265 protected virtual void ItemList_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {266 if (InvokeRequired) 267 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>( ItemList_ItemsAdded), sender, e);265 #region Content Events 266 protected virtual void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 267 if (InvokeRequired) 268 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsAdded), sender, e); 268 269 else 269 270 foreach (IndexedItem<T> item in e.Items) 270 271 InsertListViewItem(item.Index, CreateListViewItem(item.Value)); 271 272 } 272 protected virtual void ItemList_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {273 if (InvokeRequired) 274 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>( ItemList_ItemsRemoved), sender, e);273 protected virtual void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 274 if (InvokeRequired) 275 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsRemoved), sender, e); 275 276 else { 276 277 List<ListViewItem> listViewItems = new List<ListViewItem>(); … … 281 282 } 282 283 } 283 protected virtual void ItemList_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {284 if (InvokeRequired) 285 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>( ItemList_ItemsReplaced), sender, e);284 protected virtual void Content_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 285 if (InvokeRequired) 286 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsReplaced), sender, e); 286 287 else { 287 288 int[] selected = new int[itemsListView.SelectedIndices.Count]; … … 301 302 } 302 303 } 303 protected virtual void ItemList_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {304 if (InvokeRequired) 305 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>( ItemList_ItemsMoved), sender, e);304 protected virtual void Content_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 305 if (InvokeRequired) 306 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsMoved), sender, e); 306 307 else { 307 308 foreach (IndexedItem<T> item in e.Items) { … … 312 313 } 313 314 } 314 protected virtual void ItemList_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) {315 if (InvokeRequired) 316 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>( ItemList_CollectionReset), sender, e);315 protected virtual void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<T>> e) { 316 if (InvokeRequired) 317 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_CollectionReset), sender, e); 317 318 else { 318 319 List<ListViewItem> listViewItems = new List<ListViewItem>(); -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemParameterView.Designer.cs
r2676 r2713 124 124 this.viewHost.Location = new System.Drawing.Point(0, 0); 125 125 this.viewHost.Name = "viewHost"; 126 this.viewHost. Object = null;126 this.viewHost.Content = null; 127 127 this.viewHost.Size = new System.Drawing.Size(374, 115); 128 128 this.viewHost.TabIndex = 0; -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemParameterView.cs
r2694 r2713 42 42 /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>. 43 43 /// No own data storage present.</remarks> 44 public new ItemParameter Parameter{45 get { return (ItemParameter) Item; }46 set { base. Item= value; }44 public new ItemParameter Content { 45 get { return (ItemParameter)base.Content; } 46 set { base.Content = value; } 47 47 } 48 48 … … 61 61 public ItemParameterView(ItemParameter parameter) 62 62 : this() { 63 Parameter= parameter;63 Content = parameter; 64 64 } 65 65 … … 68 68 /// </summary> 69 69 /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 70 protected override void Deregister ObjectEvents() {71 Parameter.ActualNameChanged -= new EventHandler(Parameter_ActualNameChanged);72 Parameter.ValueChanged -= new EventHandler(Parameter_ValueChanged);73 base.Deregister ObjectEvents();70 protected override void DeregisterContentEvents() { 71 Content.ActualNameChanged -= new EventHandler(Content_ActualNameChanged); 72 Content.ValueChanged -= new EventHandler(Content_ValueChanged); 73 base.DeregisterContentEvents(); 74 74 } 75 75 … … 78 78 /// </summary> 79 79 /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 80 protected override void Register ObjectEvents() {81 base.Register ObjectEvents();82 Parameter.ActualNameChanged += new EventHandler(Parameter_ActualNameChanged);83 Parameter.ValueChanged += new EventHandler(Parameter_ValueChanged);80 protected override void RegisterContentEvents() { 81 base.RegisterContentEvents(); 82 Content.ActualNameChanged += new EventHandler(Content_ActualNameChanged); 83 Content.ValueChanged += new EventHandler(Content_ValueChanged); 84 84 } 85 85 86 protected override void On ObjectChanged() {87 base.On ObjectChanged();88 if ( Parameter== null) {86 protected override void OnContentChanged() { 87 base.OnContentChanged(); 88 if (Content == null) { 89 89 Caption = "Parameter"; 90 90 actualNameTextBox.Text = "-"; … … 93 93 clearValueButton.Enabled = false; 94 94 valueGroupBox.Enabled = false; 95 viewHost. Object = null;95 viewHost.Content = null; 96 96 } else { 97 Caption = Parameter.Name + " (" + Parameter.GetType().Name + ")";98 actualNameTextBox.Text = Parameter.ActualName;99 actualNameTextBox.Enabled = Parameter.Value == null;100 setValueButton.Enabled = Parameter.Value == null;101 clearValueButton.Enabled = Parameter.Value != null;97 Caption = Content.Name + " (" + Content.GetType().Name + ")"; 98 actualNameTextBox.Text = Content.ActualName; 99 actualNameTextBox.Enabled = Content.Value == null; 100 setValueButton.Enabled = Content.Value == null; 101 clearValueButton.Enabled = Content.Value != null; 102 102 valueGroupBox.Enabled = true; 103 viewHost. Object = Parameter.Value;103 viewHost.Content = Content.Value; 104 104 } 105 105 } 106 106 107 protected virtual void Parameter_ActualNameChanged(object sender, EventArgs e) {107 protected virtual void Content_ActualNameChanged(object sender, EventArgs e) { 108 108 if (InvokeRequired) 109 Invoke(new EventHandler( Parameter_ActualNameChanged), sender, e);109 Invoke(new EventHandler(Content_ActualNameChanged), sender, e); 110 110 else 111 actualNameTextBox.Text = Parameter.ActualName;111 actualNameTextBox.Text = Content.ActualName; 112 112 } 113 protected virtual void Parameter_ValueChanged(object sender, EventArgs e) {113 protected virtual void Content_ValueChanged(object sender, EventArgs e) { 114 114 if (InvokeRequired) 115 Invoke(new EventHandler( Parameter_ValueChanged), sender, e);115 Invoke(new EventHandler(Content_ValueChanged), sender, e); 116 116 else { 117 actualNameTextBox.Enabled = Parameter.Value == null;118 setValueButton.Enabled = Parameter.Value == null;119 clearValueButton.Enabled = Parameter.Value != null;120 viewHost. Object = Parameter.Value;117 actualNameTextBox.Enabled = Content.Value == null; 118 setValueButton.Enabled = Content.Value == null; 119 clearValueButton.Enabled = Content.Value != null; 120 viewHost.Content = Content.Value; 121 121 } 122 122 } 123 123 124 124 protected virtual void actualNameTextBox_Validated(object sender, EventArgs e) { 125 Parameter.ActualName = actualNameTextBox.Text;125 Content.ActualName = actualNameTextBox.Text; 126 126 } 127 127 protected virtual void setValueButton_Click(object sender, EventArgs e) { … … 130 130 typeSelectorDialog.Caption = "Select Value Type"; 131 131 } 132 typeSelectorDialog.TypeSelector.Configure( Parameter.DataType, false, false);132 typeSelectorDialog.TypeSelector.Configure(Content.DataType, false, false); 133 133 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) 134 Parameter.Value = (IItem)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();134 Content.Value = (IItem)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 135 135 } 136 136 protected virtual void clearValueButton_Click(object sender, EventArgs e) { 137 Parameter.Value = null;137 Content.Value = null; 138 138 } 139 139 protected virtual void valuePanel_DragEnterOver(object sender, DragEventArgs e) { 140 140 e.Effect = DragDropEffects.None; 141 141 Type type = e.Data.GetData("Type") as Type; 142 if ((type != null) && ( Parameter.DataType.IsAssignableFrom(type))) {142 if ((type != null) && (Content.DataType.IsAssignableFrom(type))) { 143 143 if ((e.KeyState & 8) == 8) e.Effect = DragDropEffects.Copy; // CTRL key 144 144 else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move; // SHIFT key … … 152 152 IItem item = e.Data.GetData("Value") as IItem; 153 153 if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) item = (IItem)item.Clone(); 154 Parameter.Value = item;154 Content.Value = item; 155 155 } 156 156 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemSetView.cs
r2655 r2713 33 33 namespace HeuristicLab.Core.Views { 34 34 public partial class ItemSetView<T> : ItemCollectionView<T> where T : class, IItem { 35 public IObservableSet<T> ItemSet {36 get { return (IObservableSet<T>) Object; }37 set { base. Object = value; }35 public new IObservableSet<T> Content { 36 get { return (IObservableSet<T>)base.Content; } 37 set { base.Content = value; } 38 38 } 39 39 … … 49 49 } 50 50 51 protected override void On ObjectChanged() {52 base.On ObjectChanged();51 protected override void OnContentChanged() { 52 base.OnContentChanged(); 53 53 Caption = "Item Set"; 54 if ( ItemSet != null)55 Caption += " (" + ItemCollection.GetType().Name + ")";54 if (Content != null) 55 Caption += " (" + Content.GetType().Name + ")"; 56 56 } 57 57 -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemView.cs
r2664 r2713 34 34 /// Base class for all visual representations. 35 35 /// </summary> 36 public partial class ItemView : ObjectView {37 public IItem Item{38 get { return (IItem)base. Object; }39 set { base. Object = value; }36 public partial class ItemView : ContentView { 37 public new IItem Content { 38 get { return (IItem)base.Content; } 39 set { base.Content = value; } 40 40 } 41 41 … … 48 48 } 49 49 50 protected override void OnObjectChanged() { 51 if (Item == null) { 50 protected override void OnContentChanged() { 51 base.OnContentChanged(); 52 if (Content == null) { 52 53 Caption = "View"; 53 54 } else { 54 Caption = Item.ItemName;55 Caption = Content.ItemName; 55 56 } 57 } 58 59 /// <summary> 60 /// Asynchron call of GUI updating. 61 /// </summary> 62 /// <param name="method">The delegate to invoke.</param> 63 protected new void Invoke(Delegate method) { 64 // enforce context switch to improve GUI response time 65 System.Threading.Thread.Sleep(0); 66 67 // prevent blocking of worker thread in Invoke, if the control is disposed 68 IAsyncResult result = BeginInvoke(method); 69 while ((!result.AsyncWaitHandle.WaitOne(100, false)) && (!IsDisposed)) { } 70 if (!IsDisposed) EndInvoke(result); 71 } 72 /// <summary> 73 /// Asynchron call of GUI updating. 74 /// </summary> 75 /// <param name="method">The delegate to invoke.</param> 76 /// <param name="args">The invoke arguments.</param> 77 protected new void Invoke(Delegate method, params object[] args) { 78 // enforce context switch to improve GUI response time 79 System.Threading.Thread.Sleep(0); 80 81 // prevent blocking of worker thread in Invoke, if the control is disposed 82 IAsyncResult result = BeginInvoke(method, args); 83 while ((!result.AsyncWaitHandle.WaitOne(100, false)) && (!IsDisposed)) { } 84 if (!IsDisposed) EndInvoke(result); 56 85 } 57 86 } -
trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemCollectionView.cs
r2676 r2713 33 33 namespace HeuristicLab.Core.Views { 34 34 public partial class NamedItemCollectionView<T> : ItemCollectionView<T> where T : class, INamedItem { 35 public IObservableKeyedCollection<string, T> NamedItemCollection{36 get { return (IObservableKeyedCollection<string, T>) Object; }37 set { base. Object = value; }35 public new IObservableKeyedCollection<string, T> Content { 36 get { return (IObservableKeyedCollection<string, T>)base.Content; } 37 set { base.Content = value; } 38 38 } 39 39 … … 49 49 } 50 50 51 protected override void Deregister ObjectEvents() {52 NamedItemCollection.ItemsReplaced -= new CollectionItemsChangedEventHandler<T>(NamedItemCollection_ItemsReplaced);53 base.Deregister ObjectEvents();51 protected override void DeregisterContentEvents() { 52 Content.ItemsReplaced -= new CollectionItemsChangedEventHandler<T>(Content_ItemsReplaced); 53 base.DeregisterContentEvents(); 54 54 } 55 protected override void Register ObjectEvents() {56 base.Register ObjectEvents();57 NamedItemCollection.ItemsReplaced += new CollectionItemsChangedEventHandler<T>(NamedItemCollection_ItemsReplaced);55 protected override void RegisterContentEvents() { 56 base.RegisterContentEvents(); 57 Content.ItemsReplaced += new CollectionItemsChangedEventHandler<T>(Content_ItemsReplaced); 58 58 } 59 59 … … 82 82 if (e.Effect != DragDropEffects.None) { 83 83 T item = e.Data.GetData("Value") as T; 84 if ((item == null) || ( NamedItemCollection.ContainsKey(item.Name)))84 if ((item == null) || (Content.ContainsKey(item.Name))) 85 85 e.Effect = DragDropEffects.None; 86 86 } … … 88 88 #endregion 89 89 90 #region NamedItemCollectionEvents91 protected virtual void NamedItemCollection_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<T> e) {90 #region Content Events 91 protected virtual void Content_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<T> e) { 92 92 if (InvokeRequired) 93 Invoke(new CollectionItemsChangedEventHandler<T>( NamedItemCollection_ItemsReplaced), sender, e);93 Invoke(new CollectionItemsChangedEventHandler<T>(Content_ItemsReplaced), sender, e); 94 94 else { 95 95 foreach (T item in e.Items) { … … 103 103 #region Helpers 104 104 protected virtual string GetUniqueName(string originalName) { 105 if (! NamedItemCollection.ContainsKey(originalName))105 if (!Content.ContainsKey(originalName)) 106 106 return originalName; 107 107 else { … … 111 111 index++; 112 112 name = originalName + index.ToString(); 113 } while ( NamedItemCollection.ContainsKey(name));113 } while (Content.ContainsKey(name)); 114 114 return name; 115 115 } -
trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemView.cs
r2676 r2713 35 35 [Content(typeof(NamedItem), true)] 36 36 public partial class NamedItemView : ItemView { 37 public NamedItem NamedItem{38 get { return (NamedItem) Item; }39 set { base. Item= value; }37 public new NamedItem Content { 38 get { return (NamedItem)base.Content; } 39 set { base.Content = value; } 40 40 } 41 41 … … 48 48 public NamedItemView(NamedItem namedItem) 49 49 : this() { 50 NamedItem= namedItem;50 Content = namedItem; 51 51 } 52 52 53 protected override void Deregister ObjectEvents() {54 NamedItem.NameChanged -= new EventHandler(NamedItem_NameChanged);55 NamedItem.DescriptionChanged -= new EventHandler(NamedItem_DescriptionChanged);56 base.Deregister ObjectEvents();53 protected override void DeregisterContentEvents() { 54 Content.NameChanged -= new EventHandler(Content_NameChanged); 55 Content.DescriptionChanged -= new EventHandler(Content_DescriptionChanged); 56 base.DeregisterContentEvents(); 57 57 } 58 protected override void Register ObjectEvents() {59 base.Register ObjectEvents();60 NamedItem.NameChanged += new EventHandler(NamedItem_NameChanged);61 NamedItem.DescriptionChanged += new EventHandler(NamedItem_DescriptionChanged);58 protected override void RegisterContentEvents() { 59 base.RegisterContentEvents(); 60 Content.NameChanged += new EventHandler(Content_NameChanged); 61 Content.DescriptionChanged += new EventHandler(Content_DescriptionChanged); 62 62 } 63 63 64 protected override void On ObjectChanged() {65 base.On ObjectChanged();66 if ( NamedItem== null) {64 protected override void OnContentChanged() { 65 base.OnContentChanged(); 66 if (Content == null) { 67 67 Caption = "NamedItem"; 68 68 nameTextBox.Text = "-"; … … 73 73 descriptionTextBox.Enabled = false; 74 74 } else { 75 Caption = NamedItem.Name + " (" + NamedItem.GetType().Name + ")";76 nameTextBox.Text = NamedItem.Name;77 nameTextBox.ReadOnly = ! NamedItem.CanChangeName;75 Caption = Content.Name + " (" + Content.GetType().Name + ")"; 76 nameTextBox.Text = Content.Name; 77 nameTextBox.ReadOnly = !Content.CanChangeName; 78 78 nameTextBox.Enabled = true; 79 descriptionTextBox.Text = NamedItem.Description;80 descriptionTextBox.ReadOnly = ! NamedItem.CanChangeDescription;79 descriptionTextBox.Text = Content.Description; 80 descriptionTextBox.ReadOnly = !Content.CanChangeDescription; 81 81 descriptionTextBox.Enabled = true; 82 82 } 83 83 } 84 84 85 protected virtual void NamedItem_NameChanged(object sender, EventArgs e) {85 protected virtual void Content_NameChanged(object sender, EventArgs e) { 86 86 if (InvokeRequired) 87 Invoke(new EventHandler( NamedItem_NameChanged), sender, e);87 Invoke(new EventHandler(Content_NameChanged), sender, e); 88 88 else 89 nameTextBox.Text = NamedItem.Name;89 nameTextBox.Text = Content.Name; 90 90 } 91 protected virtual void NamedItem_DescriptionChanged(object sender, EventArgs e) {91 protected virtual void Content_DescriptionChanged(object sender, EventArgs e) { 92 92 if (InvokeRequired) 93 Invoke(new EventHandler( NamedItem_DescriptionChanged), sender, e);93 Invoke(new EventHandler(Content_DescriptionChanged), sender, e); 94 94 else 95 descriptionTextBox.Text = NamedItem.Description;95 descriptionTextBox.Text = Content.Description; 96 96 } 97 97 98 98 protected virtual void nameTextBox_Validating(object sender, CancelEventArgs e) { 99 if ( NamedItem.CanChangeName) {100 NamedItem.Name = nameTextBox.Text;99 if (Content.CanChangeName) { 100 Content.Name = nameTextBox.Text; 101 101 102 102 // check if variable name was set successfully 103 if (! NamedItem.Name.Equals(nameTextBox.Text)) {103 if (!Content.Name.Equals(nameTextBox.Text)) { 104 104 e.Cancel = true; 105 105 errorProvider.SetError(nameTextBox, "Invalid Name"); … … 115 115 nameLabel.Focus(); // set focus on label to validate data 116 116 if (e.KeyCode == Keys.Escape) { 117 nameTextBox.Text = NamedItem.Name;117 nameTextBox.Text = Content.Name; 118 118 nameLabel.Focus(); // set focus on label to validate data 119 119 } 120 120 } 121 121 protected virtual void descriptionTextBox_Validated(object sender, EventArgs e) { 122 if ( NamedItem.CanChangeDescription)123 NamedItem.Description = descriptionTextBox.Text;122 if (Content.CanChangeDescription) 123 Content.Description = descriptionTextBox.Text; 124 124 } 125 125 } -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorCollectionView.cs
r2676 r2713 32 32 public OperatorCollectionView(IObservableCollection<IOperator> operatorCollection) 33 33 : this() { 34 ItemCollection= operatorCollection;34 Content = operatorCollection; 35 35 } 36 36 -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorGraphView.Designer.cs
r2676 r2713 82 82 | System.Windows.Forms.AnchorStyles.Right))); 83 83 this.operatorsView.Caption = "Operator Set"; 84 this.operatorsView.ItemCollection = null;85 this.operatorsView.ItemSet = null;86 84 this.operatorsView.Location = new System.Drawing.Point(3, 3); 87 85 this.operatorsView.Name = "operatorsView"; 88 this.operatorsView.Object = null;89 86 this.operatorsView.Size = new System.Drawing.Size(602, 309); 90 87 this.operatorsView.TabIndex = 0; … … 97 94 | System.Windows.Forms.AnchorStyles.Right))); 98 95 this.graphView.Caption = "Operator"; 99 this.graphView.Item = null;100 96 this.graphView.Location = new System.Drawing.Point(6, 19); 101 97 this.graphView.Name = "graphView"; 102 this.graphView.Object = null;103 this.graphView.Operator = null;104 98 this.graphView.Size = new System.Drawing.Size(590, 183); 105 99 this.graphView.TabIndex = 0; -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorGraphView.cs
r2676 r2713 43 43 /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>. 44 44 /// No own data storage present.</remarks> 45 public OperatorGraph OperatorGraph{46 get { return (OperatorGraph) Item; }47 set { base. Item= value; }45 public new OperatorGraph Content { 46 get { return (OperatorGraph)base.Content; } 47 set { base.Content = value; } 48 48 } 49 49 … … 63 63 public OperatorGraphView(OperatorGraph operatorGraph) 64 64 : this() { 65 OperatorGraph= operatorGraph;65 Content = operatorGraph; 66 66 } 67 67 … … 70 70 /// </summary> 71 71 /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 72 protected override void Deregister ObjectEvents() {73 OperatorGraph.InitialOperatorChanged -= new EventHandler(OperatorGraph_InitialOperatorChanged);74 base.Deregister ObjectEvents();72 protected override void DeregisterContentEvents() { 73 Content.InitialOperatorChanged -= new EventHandler(Content_InitialOperatorChanged); 74 base.DeregisterContentEvents(); 75 75 } 76 76 … … 79 79 /// </summary> 80 80 /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 81 protected override void Register ObjectEvents() {82 base.Register ObjectEvents();83 OperatorGraph.InitialOperatorChanged += new EventHandler(OperatorGraph_InitialOperatorChanged);81 protected override void RegisterContentEvents() { 82 base.RegisterContentEvents(); 83 Content.InitialOperatorChanged += new EventHandler(Content_InitialOperatorChanged); 84 84 } 85 85 … … 88 88 /// </summary> 89 89 /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks> 90 protected override void On ObjectChanged() {91 base.On ObjectChanged();92 operatorsView. ItemSet = null;90 protected override void OnContentChanged() { 91 base.OnContentChanged(); 92 operatorsView.Content = null; 93 93 operatorsView.Enabled = false; 94 graphView. Operator= null;94 graphView.Content = null; 95 95 graphView.Enabled = false; 96 if ( OperatorGraph== null) {96 if (Content == null) { 97 97 Caption = "Operator Graph"; 98 operatorsView. ItemSet = null;98 operatorsView.Content = null; 99 99 operatorsView.Enabled = false; 100 graphView. Operator= null;100 graphView.Content = null; 101 101 graphView.Enabled = false; 102 102 } else { 103 Caption = OperatorGraph.ItemName + " (" + OperatorGraph.GetType().Name + ")";104 operatorsView. ItemSet = OperatorGraph.Operators;103 Caption = Content.ItemName + " (" + Content.GetType().Name + ")"; 104 operatorsView.Content = Content.Operators; 105 105 operatorsView.Enabled = true; 106 106 MarkInitialOperator(); 107 graphView. Operator = OperatorGraph.InitialOperator;107 graphView.Content = Content.InitialOperator; 108 108 graphView.Enabled = true; 109 109 } … … 112 112 protected virtual void MarkInitialOperator() { 113 113 foreach (ListViewItem item in operatorsView.ItemsListView.Items) { 114 if (( OperatorGraph.InitialOperator != null) && (((IOperator)item.Tag) == OperatorGraph.InitialOperator))114 if ((Content.InitialOperator != null) && (((IOperator)item.Tag) == Content.InitialOperator)) 115 115 item.Font = new Font(operatorsView.ItemsListView.Font, FontStyle.Bold); 116 116 else … … 130 130 initialOperatorToolStripMenuItem.Enabled = true; 131 131 initialOperatorToolStripMenuItem.Tag = op; 132 if (op == OperatorGraph.InitialOperator)132 if (op == Content.InitialOperator) 133 133 initialOperatorToolStripMenuItem.Checked = true; 134 134 } … … 136 136 protected virtual void initialOperatorToolStripMenuItem_Click(object sender, EventArgs e) { 137 137 if (initialOperatorToolStripMenuItem.Checked) 138 OperatorGraph.InitialOperator = (IOperator)initialOperatorToolStripMenuItem.Tag;138 Content.InitialOperator = (IOperator)initialOperatorToolStripMenuItem.Tag; 139 139 else 140 OperatorGraph.InitialOperator = null;140 Content.InitialOperator = null; 141 141 } 142 142 #endregion 143 143 144 #region OperatorGraphEvents145 protected virtual void OperatorGraph_InitialOperatorChanged(object sender, EventArgs e) {144 #region Content Events 145 protected virtual void Content_InitialOperatorChanged(object sender, EventArgs e) { 146 146 if (InvokeRequired) 147 Invoke(new EventHandler( OperatorGraph_InitialOperatorChanged), sender, e);147 Invoke(new EventHandler(Content_InitialOperatorChanged), sender, e); 148 148 else { 149 149 MarkInitialOperator(); 150 graphView. Operator = OperatorGraph.InitialOperator;150 graphView.Content = Content.InitialOperator; 151 151 } 152 152 } -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorListView.cs
r2676 r2713 32 32 public OperatorListView(IObservableList<IOperator> operatorList) 33 33 : this() { 34 ItemList = operatorList;34 Content = operatorList; 35 35 } 36 36 -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorSetView.cs
r2676 r2713 32 32 public OperatorSetView(IObservableSet<IOperator> operatorSet) 33 33 : this() { 34 ItemSet = operatorSet;34 Content = operatorSet; 35 35 } 36 36 -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.cs
r2708 r2713 47 47 /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>. 48 48 /// No own data storage present.</remarks> 49 public IOperator Operator{50 get { return (IOperator) Item; }51 set { base. Item= value; }49 public new IOperator Content { 50 get { return (IOperator)base.Content; } 51 set { base.Content = value; } 52 52 } 53 53 … … 71 71 public OperatorTreeView(IOperator op) 72 72 : this() { 73 Operator= op;73 Content = op; 74 74 } 75 75 … … 78 78 /// </summary> 79 79 /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks> 80 protected override void On ObjectChanged() {81 base.On ObjectChanged();80 protected override void OnContentChanged() { 81 base.OnContentChanged(); 82 82 if (graphTreeView.Nodes.Count > 0) 83 83 RemoveTreeNode(graphTreeView.Nodes[0]); 84 84 graphTreeView.Enabled = false; 85 85 Caption = "Operator"; 86 if ( Operator!= null) {87 Caption = Operator.Name + " (" + Operator.GetType().Name + ")";86 if (Content != null) { 87 Caption = Content.Name + " (" + Content.GetType().Name + ")"; 88 88 TreeNode root = new TreeNode(); 89 FillTreeNode(root, Operator);89 FillTreeNode(root, Content); 90 90 graphTreeView.Nodes.Add(root); 91 91 graphTreeView.Enabled = true; -
trunk/sources/HeuristicLab.Core.Views/3.3/ParameterCollectionView.cs
r2676 r2713 31 31 public ParameterCollectionView(IObservableKeyedCollection<string, IParameter> parameterCollection) 32 32 : this() { 33 NamedItemCollection= parameterCollection;33 Content = parameterCollection; 34 34 } 35 35 … … 39 39 if (createParameterDialog.ShowDialog(this) == DialogResult.OK) { 40 40 IParameter param = createParameterDialog.Parameter; 41 if ( NamedItemCollection.ContainsKey(param.Name))41 if (Content.ContainsKey(param.Name)) 42 42 param = (IParameter)Activator.CreateInstance(param.GetType(), GetUniqueName(param.Name), param.Description); 43 43 return param; -
trunk/sources/HeuristicLab.Core.Views/3.3/ParameterView.cs
r2665 r2713 40 40 /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>. 41 41 /// No own data storage present.</remarks> 42 public Parameter Parameter{43 get { return (Parameter) Item; }44 set { base. Item= value; }42 public new Parameter Content { 43 get { return (Parameter)base.Content; } 44 set { base.Content = value; } 45 45 } 46 46 … … 59 59 public ParameterView(Parameter parameter) 60 60 : this() { 61 Parameter= parameter;61 Content = parameter; 62 62 } 63 63 64 protected override void On ObjectChanged() {65 base.On ObjectChanged();66 if ( Parameter== null) {64 protected override void OnContentChanged() { 65 base.OnContentChanged(); 66 if (Content == null) { 67 67 Caption = "Parameter"; 68 68 dataTypeTextBox.Text = "-"; 69 69 dataTypeTextBox.Enabled = false; 70 70 } else { 71 Caption = Parameter.Name + " (" + Parameter.GetType().Name + ")";72 dataTypeTextBox.Text = Parameter.DataType.Name;71 Caption = Content.Name + " (" + Content.GetType().Name + ")"; 72 dataTypeTextBox.Text = Content.DataType.Name; 73 73 dataTypeTextBox.Enabled = true; 74 74 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ScopeListView.cs
r2687 r2713 30 30 public ScopeListView(IObservableList<IScope> scopeList) 31 31 : this() { 32 ItemList = scopeList;32 Content = scopeList; 33 33 } 34 34 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ScopeView.Designer.cs
r2676 r2713 112 112 | System.Windows.Forms.AnchorStyles.Right))); 113 113 this.variableCollectionView.Caption = "VariableCollection"; 114 this.variableCollectionView.ItemCollection = null;115 114 this.variableCollectionView.Location = new System.Drawing.Point(3, 3); 116 115 this.variableCollectionView.Name = "variableCollectionView"; 117 this.variableCollectionView.NamedItemCollection = null;118 this.variableCollectionView.Object = null;119 116 this.variableCollectionView.Size = new System.Drawing.Size(394, 190); 120 117 this.variableCollectionView.TabIndex = 0; -
trunk/sources/HeuristicLab.Core.Views/3.3/ScopeView.cs
r2687 r2713 46 46 /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>. 47 47 /// No own data storage present.</remarks> 48 public IScope Scope{49 get { return (IScope) Item; }50 set { base. Item= value; }48 public new IScope Content { 49 get { return (IScope)base.Content; } 50 set { base.Content = value; } 51 51 } 52 52 … … 69 69 public ScopeView(IScope scope) 70 70 : this() { 71 Scope= scope;71 Content = scope; 72 72 } 73 73 … … 76 76 /// </summary> 77 77 /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks> 78 protected override void On ObjectChanged() {79 base.On ObjectChanged();78 protected override void OnContentChanged() { 79 base.OnContentChanged(); 80 80 if (scopesTreeView.Nodes.Count > 0) { 81 81 RemoveTreeNode(scopesTreeView.Nodes[0]); 82 82 scopesTreeView.Nodes.Clear(); 83 83 } 84 variableCollectionView. NamedItemCollection= null;84 variableCollectionView.Content = null; 85 85 variableCollectionView.Enabled = false; 86 if ( Scope== null) {86 if (Content == null) { 87 87 Caption = "Scope"; 88 88 scopesTreeView.Enabled = false; 89 89 } else { 90 Caption = Scope.Name + " (" + Scope.GetType().Name + ")";90 Caption = Content.Name + " (" + Content.GetType().Name + ")"; 91 91 scopesTreeView.Enabled = true; 92 scopesTreeView.Nodes.Add(CreateTreeNode( Scope));92 scopesTreeView.Nodes.Add(CreateTreeNode(Content)); 93 93 } 94 94 } … … 133 133 TreeNode node = scopesTreeView.GetNodeAt(e.X, e.Y); 134 134 if ((node != null) && (node.Tag is IScope)) { 135 variableCollectionView. NamedItemCollection= ((IScope)node.Tag).Variables;135 variableCollectionView.Content = ((IScope)node.Tag).Variables; 136 136 variableCollectionView.Enabled = true; 137 137 } else { 138 variableCollectionView. NamedItemCollection= null;138 variableCollectionView.Content = null; 139 139 variableCollectionView.Enabled = false; 140 140 if (node == null) scopesTreeView.SelectedNode = null; -
trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelectorDialog.cs
r2676 r2713 60 60 } 61 61 62 63 62 protected virtual void TypeSelectorDialog_Load(object sender, EventArgs e) { 64 63 this.typeSelector.TypesTreeView.DoubleClick += new System.EventHandler(TypesTreeView_DoubleClick); -
trunk/sources/HeuristicLab.Core.Views/3.3/VariableCollectionView.cs
r2687 r2713 30 30 public VariableCollectionView(IObservableKeyedCollection<string, IVariable> variableCollection) 31 31 : this() { 32 NamedItemCollection= variableCollection;32 Content = variableCollection; 33 33 } 34 34 -
trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.Designer.cs
r2676 r2713 125 125 this.viewHost.Location = new System.Drawing.Point(0, 0); 126 126 this.viewHost.Name = "viewHost"; 127 this.viewHost. Object = null;127 this.viewHost.Content = null; 128 128 this.viewHost.Size = new System.Drawing.Size(347, 100); 129 129 this.viewHost.TabIndex = 0; -
trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.cs
r2694 r2713 42 42 /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>. 43 43 /// No own data storage present.</remarks> 44 public Variable Variable{45 get { return (Variable) Item; }46 set { base. Item= value; }44 public new Variable Content { 45 get { return (Variable)base.Content; } 46 set { base.Content = value; } 47 47 } 48 48 … … 61 61 public VariableView(Variable variable) 62 62 : this() { 63 Variable= variable;63 Content = variable; 64 64 } 65 65 … … 68 68 /// </summary> 69 69 /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 70 protected override void Deregister ObjectEvents() {71 Variable.ValueChanged -= new EventHandler(Variable_ValueChanged);72 base.Deregister ObjectEvents();70 protected override void DeregisterContentEvents() { 71 Content.ValueChanged -= new EventHandler(Content_ValueChanged); 72 base.DeregisterContentEvents(); 73 73 } 74 74 … … 77 77 /// </summary> 78 78 /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks> 79 protected override void Register ObjectEvents() {80 base.Register ObjectEvents();81 Variable.ValueChanged += new EventHandler(Variable_ValueChanged);79 protected override void RegisterContentEvents() { 80 base.RegisterContentEvents(); 81 Content.ValueChanged += new EventHandler(Content_ValueChanged); 82 82 } 83 83 84 protected override void On ObjectChanged() {85 base.On ObjectChanged();86 if ( Variable== null) {84 protected override void OnContentChanged() { 85 base.OnContentChanged(); 86 if (Content == null) { 87 87 Caption = "Variable"; 88 88 dataTypeTextBox.Text = "-"; … … 91 91 clearValueButton.Enabled = false; 92 92 valueGroupBox.Enabled = false; 93 viewHost. Object = null;93 viewHost.Content = null; 94 94 } else { 95 Caption = Variable.Name + " (" + Variable.GetType().Name + ")";96 dataTypeTextBox.Text = Variable.Value == null ? "-" : Variable.Value.GetType().FullName;97 dataTypeTextBox.Enabled = Variable.Value != null;98 setValueButton.Enabled = Variable.Value == null;99 clearValueButton.Enabled = Variable.Value != null;95 Caption = Content.Name + " (" + Content.GetType().Name + ")"; 96 dataTypeTextBox.Text = Content.Value == null ? "-" : Content.Value.GetType().FullName; 97 dataTypeTextBox.Enabled = Content.Value != null; 98 setValueButton.Enabled = Content.Value == null; 99 clearValueButton.Enabled = Content.Value != null; 100 100 valueGroupBox.Enabled = true; 101 viewHost. Object = Variable.Value;101 viewHost.Content = Content.Value; 102 102 } 103 103 } 104 104 105 protected virtual void Variable_ValueChanged(object sender, EventArgs e) {105 protected virtual void Content_ValueChanged(object sender, EventArgs e) { 106 106 if (InvokeRequired) 107 Invoke(new EventHandler( Variable_ValueChanged), sender, e);107 Invoke(new EventHandler(Content_ValueChanged), sender, e); 108 108 else { 109 dataTypeTextBox.Text = Variable.Value == null ? "-" : Variable.Value.GetType().FullName;110 dataTypeTextBox.Enabled = Variable.Value != null;111 setValueButton.Enabled = Variable.Value == null;112 clearValueButton.Enabled = Variable.Value != null;113 viewHost. Object = Variable.Value;109 dataTypeTextBox.Text = Content.Value == null ? "-" : Content.Value.GetType().FullName; 110 dataTypeTextBox.Enabled = Content.Value != null; 111 setValueButton.Enabled = Content.Value == null; 112 clearValueButton.Enabled = Content.Value != null; 113 viewHost.Content = Content.Value; 114 114 } 115 115 } … … 122 122 } 123 123 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) { 124 Variable.Value = (IItem)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();124 Content.Value = (IItem)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 125 125 } 126 126 } 127 127 protected virtual void clearValueButton_Click(object sender, EventArgs e) { 128 Variable.Value = null;128 Content.Value = null; 129 129 } 130 130 protected virtual void valuePanel_DragEnterOver(object sender, DragEventArgs e) { … … 143 143 IItem item = e.Data.GetData("Value") as IItem; 144 144 if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) item = (IItem)item.Clone(); 145 Variable.Value = item;145 Content.Value = item; 146 146 } 147 147 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ViewHost.cs
r2708 r2713 34 34 private Dictionary<Type, ToolStripMenuItem> typeMenuItemTable; 35 35 36 private object obj;37 public object Object {38 get { return obj; }36 private object content; 37 public object Content { 38 get { return content; } 39 39 set { 40 if (value != obj) {41 obj= value;40 if (value != content) { 41 content = value; 42 42 Initialize(); 43 43 } … … 63 63 viewPanel.Visible = false; 64 64 65 if ( Object != null) {66 var viewTypes = from t in MainFormManager.GetViewTypes( Object.GetType())65 if (Content != null) { 66 var viewTypes = from t in MainFormManager.GetViewTypes(Content.GetType()) 67 67 orderby t.Name ascending 68 68 select t; … … 84 84 } 85 85 86 Control view = (Control)MainFormManager.CreateDefaultView( Object);86 Control view = (Control)MainFormManager.CreateDefaultView(Content); 87 87 if (view != null) { 88 88 viewPanel.Controls.Add(view); … … 98 98 99 99 private void viewsLabel_DoubleClick(object sender, EventArgs e) { 100 MainFormManager.CreateView(viewPanel.Tag.GetType(), Object).Show();100 MainFormManager.CreateView(viewPanel.Tag.GetType(), Content).Show(); 101 101 } 102 102 protected void contextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { … … 111 111 if (viewPanel.Controls.Count > 0) viewPanel.Controls[0].Dispose(); 112 112 viewPanel.Controls.Clear(); 113 Control view = (Control)MainFormManager.CreateView(viewType, Object);113 Control view = (Control)MainFormManager.CreateView(viewType, Content); 114 114 viewPanel.Controls.Add(view); 115 115 viewPanel.Tag = view;
Note: See TracChangeset
for help on using the changeset viewer.