- Timestamp:
- 05/07/10 18:12:52 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs
r3694 r3709 204 204 T item = itemsListView.SelectedItems[0].Tag as T; 205 205 detailsGroupBox.Enabled = true; 206 viewHost.ViewType = null;207 206 viewHost.Content = item; 208 207 } else { -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
r3694 r3709 167 167 T item = (T)itemsListView.SelectedItems[0].Tag; 168 168 detailsGroupBox.Enabled = true; 169 viewHost.ViewType = null;170 169 viewHost.Content = item; 171 170 } else { -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs
r3694 r3709 199 199 T item = (T)itemsListView.SelectedItems[0].Tag; 200 200 detailsGroupBox.Enabled = true; 201 viewHost.ViewType = null;202 201 viewHost.Content = item; 203 202 } else { -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs
r3670 r3709 83 83 } 84 84 } 85 public new IContent Content {86 get { return base.Content; }87 set {88 if (value == null || this.Content == null || value.GetType() != this.Content.GetType())89 cachedViews.Clear();90 91 base.Content = value;92 }93 }94 85 95 86 public new bool Enabled { … … 118 109 119 110 if (!ViewCanShowContent(viewType, Content)) { 111 cachedViews.Clear(); 120 112 ViewType = MainFormManager.GetDefaultViewType(Content.GetType()); 121 113 if ((viewType == null) && (viewContextMenuStrip.Items.Count > 0)) // create first available view if default view is not available … … 129 121 viewsLabel.Visible = false; 130 122 viewPanel.Visible = false; 131 if (viewPanel.Controls.Count > 0) viewPanel.Controls[0].Dispose();132 viewPanel.Controls.Clear();133 cachedViews.Clear();134 123 } 135 124 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs
r3694 r3709 75 75 } else { 76 76 repetitionsNumericUpDown.Value = Content.Repetitions; 77 algorithmViewHost.ViewType = null;78 77 algorithmViewHost.Content = Content.Algorithm; 79 78 runsView.Content = Content.Runs; … … 127 126 Invoke(new EventHandler(Content_AlgorithmChanged), sender, e); 128 127 else { 129 algorithmViewHost.ViewType = null;130 128 algorithmViewHost.Content = Content.Algorithm; 131 129 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
r3694 r3709 98 98 while (itemsListView.Items.Count > 0) RemoveListViewItem(itemsListView.Items[0]); 99 99 viewHost.Content = null; 100 runCollectionConstraintCollectionView.Content = null;101 tabControl.TabPages.Remove(constraintPage);102 100 103 101 if (Content != null) { 104 102 if (RunCollection != null) { 105 tabControl.TabPages.Add(constraintPage); 103 if (!tabControl.TabPages.Contains(constraintPage)) 104 tabControl.TabPages.Add(constraintPage); 106 105 runCollectionConstraintCollectionView.Content = RunCollection.Constraints; 107 106 runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0; … … 112 111 UpdateRun(item); 113 112 } 113 } else { 114 runCollectionConstraintCollectionView.Content = null; 115 if (tabControl.TabPages.Contains(constraintPage)) 116 tabControl.TabPages.Remove(constraintPage); 114 117 } 115 118 SetEnabledStateOfControls(); … … 183 186 IRun item = (IRun)itemsListView.SelectedItems[0].Tag; 184 187 detailsGroupBox.Enabled = true; 185 viewHost.ViewType = null;186 188 viewHost.Content = item; 187 189 } else {
Note: See TracChangeset
for help on using the changeset viewer.