- Timestamp:
- 04/18/10 03:01:25 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/DockingMainForm.cs
r2963 r3394 36 36 InitializeComponent(); 37 37 } 38 39 38 public DockingMainForm(Type userInterfaceItemType) 40 39 : base(userInterfaceItemType) { 41 40 InitializeComponent(); 41 } 42 public DockingMainForm(Type userInterfaceItemType, bool showInViewHost) 43 : this(userInterfaceItemType) { 44 this.ShowInViewHost = showInViewHost; 42 45 } 43 46 … … 64 67 65 68 protected override Form CreateForm(IView view) { 66 return new DockForm(view); 69 DockForm form; 70 IContentView contentView = view as IContentView; 71 if (ShowInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) { 72 ViewHost viewHost = new ViewHost(contentView.Content); 73 form = new DockForm(viewHost); 74 } else 75 form = new DockForm(view); 76 return form; 67 77 } 68 78 -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/MainForm.cs
r3301 r3394 51 51 52 52 #region properties 53 private bool showInViewHost; 54 public bool ShowInViewHost { 55 get { return this.showInViewHost; } 56 set { this.showInViewHost = value; } 57 } 58 53 59 public string Title { 54 60 get { return this.Text; } -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/MultipleDocumentMainForm.cs
r2790 r3394 35 35 InitializeComponent(); 36 36 } 37 38 37 public MultipleDocumentMainForm(Type userInterfaceType) 39 38 : base(userInterfaceType) { 40 39 InitializeComponent(); 40 } 41 public MultipleDocumentMainForm(Type userInterfaceItemType, bool showInViewHost) 42 : this(userInterfaceItemType) { 43 this.ShowInViewHost = showInViewHost; 41 44 } 42 45 … … 70 73 71 74 protected override Form CreateForm(IView view) { 72 Form form = new DocumentForm(view); 75 Form form; 76 IContentView contentView = view as IContentView; 77 if (ShowInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) { 78 ViewHost viewHost = new ViewHost(contentView.Content); 79 form = new DocumentForm(viewHost); 80 } else 81 form = new DocumentForm(view); 82 73 83 form.MdiParent = this; 74 84 return form; -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/SingleDocumentMainForm.cs
r2790 r3394 36 36 InitializeComponent(); 37 37 } 38 39 38 public SingleDocumentMainForm(Type userInterfaceItemType) 40 39 : base(userInterfaceItemType) { 41 40 InitializeComponent(); 41 } 42 public SingleDocumentMainForm(Type userInterfaceItemType, bool showInViewHost) 43 : this(userInterfaceItemType) { 44 this.ShowInViewHost = showInViewHost; 42 45 } 43 46 … … 64 67 65 68 protected override Form CreateForm(IView view) { 66 DocumentForm form = new DocumentForm(view); 69 Form form; 70 IContentView contentView = view as IContentView; 71 if (ShowInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) { 72 ViewHost viewHost = new ViewHost(contentView.Content); 73 form = new DocumentForm(viewHost); 74 } else 75 form = new DocumentForm(view); 76 67 77 form.ShowInTaskbar = true; 68 78 return form; -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ViewHost.cs
r3391 r3394 130 130 cachedViews.Add(viewType, view); 131 131 } 132 this.Caption = view.Caption; 133 this.SaveEnabled = view.SaveEnabled; 132 134 133 135 Control control = (Control)view; -
trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLabOptimizerPlugin.cs.frame
r3384 r3394 40 40 public override void Run() { 41 41 OptimizerMainForm mainForm = new OptimizerMainForm(typeof(IOptimizerUserInterfaceItemProvider)); 42 mainForm.ShowInViewHost = true; 42 43 Application.Run(mainForm); 43 44 } -
trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMainForm.cs
r3376 r3394 41 41 InitializeComponent(); 42 42 } 43 44 43 public OptimizerMainForm(Type userInterfaceItemType) 45 44 : base(userInterfaceItemType) { 46 45 InitializeComponent(); 46 } 47 public OptimizerMainForm(Type userInterfaceItemType, bool showInViewHost) 48 : this(userInterfaceItemType) { 49 this.ShowInViewHost = showInViewHost; 47 50 } 48 51
Note: See TracChangeset
for help on using the changeset viewer.