- Timestamp:
- 04/18/10 03:25:33 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorGraphView.cs
r3362 r3395 30 30 /// The visual representation of an <see cref="OperatorGraph"/>. 31 31 /// </summary> 32 [View("OperatorGraph View (Tree)" ,ShowInViewHost=true)]32 [View("OperatorGraph View (Tree)")] 33 33 [Content(typeof(OperatorGraph), false)] 34 34 public partial class OperatorGraphView : ItemView { -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/DockForm.cs
r3281 r3395 58 58 this.view.CaptionChanged += new EventHandler(View_CaptionChanged); 59 59 UpdateText(); 60 61 ContentView contentView = view as ContentView; 62 if (ViewAttribute.GetShowInViewHost(viewType) && contentView != null) { 63 ViewHost viewHost = new ViewHost(); 64 viewHost.ViewType = viewType; 65 viewHost.Content = contentView.Content; 66 viewHost.Dock = DockStyle.Fill; 67 viewPanel.Controls.Add(viewHost); 68 } else 69 viewPanel.Controls.Add(control); 60 viewPanel.Controls.Add(control); 70 61 } 71 62 } else { -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/DockingMainForm.cs
r3394 r3395 40 40 InitializeComponent(); 41 41 } 42 public DockingMainForm(Type userInterfaceItemType, bool show InViewHost)42 public DockingMainForm(Type userInterfaceItemType, bool showViewsInViewHost) 43 43 : this(userInterfaceItemType) { 44 this.Show InViewHost = showInViewHost;44 this.ShowViewsInViewHost = showViewsInViewHost; 45 45 } 46 46 … … 69 69 DockForm form; 70 70 IContentView contentView = view as IContentView; 71 if (Show InViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {71 if (ShowViewsInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) { 72 72 ViewHost viewHost = new ViewHost(contentView.Content); 73 73 form = new DockForm(viewHost); -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/DocumentForm.cs
r3281 r3395 44 44 view.CaptionChanged += new EventHandler(View_CaptionChanged); 45 45 UpdateText(); 46 47 ContentView contentView = view as ContentView; 48 if (ViewAttribute.GetShowInViewHost(viewType) && contentView != null) { 49 ViewHost viewHost = new ViewHost(); 50 viewHost.ViewType = viewType; 51 viewHost.Content = contentView.Content; 52 viewHost.Dock = DockStyle.Fill; 53 viewPanel.Controls.Add(viewHost); 54 } else 55 viewPanel.Controls.Add(control); 46 viewPanel.Controls.Add(control); 56 47 } else { 57 48 Label errorLabel = new Label(); -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/MainForm.cs
r3394 r3395 43 43 this.userInterfaceItems = new List<IUserInterfaceItem>(); 44 44 this.initialized = false; 45 this.showViewsInViewHost = false; 45 46 } 46 47 … … 51 52 52 53 #region properties 53 private bool show InViewHost;54 public bool Show InViewHost {55 get { return this.show InViewHost; }56 set { this.show InViewHost = value; }54 private bool showViewsInViewHost; 55 public bool ShowViewsInViewHost { 56 get { return this.showViewsInViewHost; } 57 set { this.showViewsInViewHost = value; } 57 58 } 58 59 -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/MultipleDocumentMainForm.cs
r3394 r3395 39 39 InitializeComponent(); 40 40 } 41 public MultipleDocumentMainForm(Type userInterfaceItemType, bool show InViewHost)41 public MultipleDocumentMainForm(Type userInterfaceItemType, bool showViewsInViewHost) 42 42 : this(userInterfaceItemType) { 43 this.Show InViewHost = showInViewHost;43 this.ShowViewsInViewHost = showViewsInViewHost; 44 44 } 45 45 … … 75 75 Form form; 76 76 IContentView contentView = view as IContentView; 77 if (Show InViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {77 if (ShowViewsInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) { 78 78 ViewHost viewHost = new ViewHost(contentView.Content); 79 79 form = new DocumentForm(viewHost); -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/SingleDocumentMainForm.cs
r3394 r3395 40 40 InitializeComponent(); 41 41 } 42 public SingleDocumentMainForm(Type userInterfaceItemType, bool show InViewHost)42 public SingleDocumentMainForm(Type userInterfaceItemType, bool showViewsInViewHost) 43 43 : this(userInterfaceItemType) { 44 this.Show InViewHost = showInViewHost;44 this.ShowViewsInViewHost = showViewsInViewHost; 45 45 } 46 46 … … 69 69 Form form; 70 70 IContentView contentView = view as IContentView; 71 if (Show InViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) {71 if (ShowViewsInViewHost && contentView != null && contentView.GetType() != typeof(ViewHost)) { 72 72 ViewHost viewHost = new ViewHost(contentView.Content); 73 73 form = new DocumentForm(viewHost); -
trunk/sources/HeuristicLab.MainForm/3.2/ViewAttribute.cs
r3281 r3395 31 31 public ViewAttribute(string name) { 32 32 this.name = name; 33 this.showInViewHost = false;34 33 } 35 34 … … 38 37 get { return this.name; } 39 38 set { this.name = value; } 40 }41 42 private bool showInViewHost;43 public bool ShowInViewHost {44 get { return this.showInViewHost; }45 set { this.showInViewHost = value; }46 39 } 47 40 … … 57 50 return viewType.Name; 58 51 } 59 60 public static bool GetShowInViewHost(MemberInfo viewType) {61 ViewAttribute[] attributes = (ViewAttribute[])viewType.GetCustomAttributes(typeof(ViewAttribute), false);62 if (attributes.Length == 1)63 return attributes[0].showInViewHost;64 return false;65 }66 52 } 67 53 } -
trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLabOptimizerPlugin.cs.frame
r3394 r3395 40 40 public override void Run() { 41 41 OptimizerMainForm mainForm = new OptimizerMainForm(typeof(IOptimizerUserInterfaceItemProvider)); 42 mainForm.Show InViewHost = true;42 mainForm.ShowViewsInViewHost = true; 43 43 Application.Run(mainForm); 44 44 } -
trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMainForm.cs
r3394 r3395 45 45 InitializeComponent(); 46 46 } 47 public OptimizerMainForm(Type userInterfaceItemType, bool show InViewHost)47 public OptimizerMainForm(Type userInterfaceItemType, bool showViewsInViewHost) 48 48 : this(userInterfaceItemType) { 49 this.Show InViewHost = showInViewHost;49 this.ShowViewsInViewHost = showViewsInViewHost; 50 50 } 51 51
Note: See TracChangeset
for help on using the changeset viewer.