Changeset 2713 for trunk/sources/HeuristicLab.Core.Views/3.3/ViewHost.cs
- Timestamp:
- 01/29/10 01:44:57 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/ViewHost.cs
r2708 r2713 34 34 private Dictionary<Type, ToolStripMenuItem> typeMenuItemTable; 35 35 36 private object obj;37 public object Object {38 get { return obj; }36 private object content; 37 public object Content { 38 get { return content; } 39 39 set { 40 if (value != obj) {41 obj= value;40 if (value != content) { 41 content = value; 42 42 Initialize(); 43 43 } … … 63 63 viewPanel.Visible = false; 64 64 65 if ( Object != null) {66 var viewTypes = from t in MainFormManager.GetViewTypes( Object.GetType())65 if (Content != null) { 66 var viewTypes = from t in MainFormManager.GetViewTypes(Content.GetType()) 67 67 orderby t.Name ascending 68 68 select t; … … 84 84 } 85 85 86 Control view = (Control)MainFormManager.CreateDefaultView( Object);86 Control view = (Control)MainFormManager.CreateDefaultView(Content); 87 87 if (view != null) { 88 88 viewPanel.Controls.Add(view); … … 98 98 99 99 private void viewsLabel_DoubleClick(object sender, EventArgs e) { 100 MainFormManager.CreateView(viewPanel.Tag.GetType(), Object).Show();100 MainFormManager.CreateView(viewPanel.Tag.GetType(), Content).Show(); 101 101 } 102 102 protected void contextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { … … 111 111 if (viewPanel.Controls.Count > 0) viewPanel.Controls[0].Dispose(); 112 112 viewPanel.Controls.Clear(); 113 Control view = (Control)MainFormManager.CreateView(viewType, Object);113 Control view = (Control)MainFormManager.CreateView(viewType, Content); 114 114 viewPanel.Controls.Add(view); 115 115 viewPanel.Tag = view;
Note: See TracChangeset
for help on using the changeset viewer.