Changeset 3796
- Timestamp:
- 05/12/10 14:27:11 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForm.cs
r3794 r3796 222 222 223 223 public IContentView ShowContent(IContent content) { 224 if (content == null) 225 throw new ArgumentNullException("Content cannot be null."); 224 226 Type viewType = MainFormManager.GetDefaultViewType(content.GetType()); 225 227 if (viewType != null) … … 228 230 } 229 231 230 internal IContentView ShowContent(IContent content, Type viewType) { 232 public IContentView ShowContent(IContent content, Type viewType) { 233 if (content == null) 234 throw new ArgumentNullException("Content cannot be null."); 231 235 if (viewType == null) 232 throw new ArgumentNullException(" Could not create view of type null");236 throw new ArgumentNullException("ViewType cannot be null."); 233 237 234 238 IContentView view; -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs
r3795 r3796 243 243 244 244 private void viewsLabel_DoubleClick(object sender, EventArgs e) { 245 IContentView view = MainFormManager. GetMainForm<MainForm>().ShowContent(this.Content, this.ViewType);245 IContentView view = MainFormManager.MainForm.ShowContent(this.Content, this.ViewType); 246 246 if (view != null) { 247 247 view.ReadOnly = this.ReadOnly; -
trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMainForm.cs
r3557 r3796 43 43 44 44 IContentView ShowContent(IContent content); 45 IContentView ShowContent(IContent content, Type viewType); 45 46 46 47 Type UserInterfaceItemType { get; } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
r3775 r3796 260 260 protected virtual void menuItem_Click(object sender, EventArgs e) { 261 261 ToolStripMenuItem menuItem = (ToolStripMenuItem)sender; 262 IContentView view = MainFormManager.CreateView((Type)menuItem.Tag); 262 Type viewType = (Type)menuItem.Tag; 263 IContentView view = MainFormManager.MainForm.ShowContent(Content, viewType); 263 264 if (view != null) { 264 265 view.Locked = Locked; 265 266 view.ReadOnly = ReadOnly; 266 view.Show();267 view.Content = Content;268 267 } 269 268 }
Note: See TracChangeset
for help on using the changeset viewer.