Changeset 3918 for trunk/sources
- Timestamp:
- 06/14/10 15:35:38 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForm.cs
r3796 r3918 239 239 if (this.ShowContentInViewHost) { 240 240 ViewHost viewHost = new ViewHost(); 241 viewHost.Content = content; 241 242 viewHost.ViewType = viewType; 242 243 view = viewHost; 243 } else 244 view.Show(); 245 } else { 244 246 view = MainFormManager.CreateView(viewType); 245 246 if (view != null) { 247 view.Show(); 248 view.Content = content; 249 } 247 if (view != null) { 248 view.Content = content; 249 view.Show(); 250 } 251 } 252 250 253 return view; 251 254 } -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs
r3863 r3918 100 100 if (viewContextMenuStrip.Items.Count == 0) { 101 101 messageLabel.Visible = true; 102 viewsLabel. Visible= false;102 viewsLabel.Enabled = false; 103 103 viewPanel.Visible = false; 104 104 } else { 105 105 messageLabel.Visible = false; 106 viewsLabel. Visible= true;106 viewsLabel.Enabled = true; 107 107 viewPanel.Visible = true; 108 108 } … … 126 126 } else { 127 127 messageLabel.Visible = false; 128 viewsLabel. Visible= false;128 viewsLabel.Enabled = false; 129 129 viewPanel.Visible = false; 130 130 } … … 132 132 133 133 private void OnViewTypeChanged() { 134 for (int i = viewPanel.Controls.Count - 1; i > 0; i--) 135 viewPanel.Controls[i].Dispose(); 134 136 viewPanel.Controls.Clear(); 137 135 138 if (viewType == null || Content == null) 136 139 return; … … 152 155 view.ReadOnly = this.ReadOnly; 153 156 view.Locked = this.Locked; 157 view.Content = Content; 154 158 cachedViews.Add(viewType, view); 155 159 } … … 159 163 viewPanel.Controls.Add(control); 160 164 viewPanel.Visible = true; 161 view .Content = Content;165 viewPanel.Refresh(); 162 166 } 163 167
Note: See TracChangeset
for help on using the changeset viewer.