- Timestamp:
- 05/05/10 23:08:02 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.Designer.cs
r3572 r3655 47 47 this.components = new System.ComponentModel.Container(); 48 48 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewHost)); 49 this.viewPanel = new ViewHostPanel();49 this.viewPanel = new HeuristicLab.MainForm.WindowsForms.ViewHostPanel(); 50 50 this.messageLabel = new System.Windows.Forms.Label(); 51 51 this.viewsLabel = new System.Windows.Forms.Label(); … … 63 63 this.viewPanel.Size = new System.Drawing.Size(205, 184); 64 64 this.viewPanel.TabIndex = 1; 65 this.viewPanel.Resize += new System.EventHandler(this.viewPanel_Resize); 65 66 // 66 67 // messageLabel … … 78 79 this.viewsLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 79 80 this.viewsLabel.ContextMenuStrip = this.viewContextMenuStrip; 80 this.viewsLabel.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Windows;81 this.viewsLabel.Image = ((System.Drawing.Image)(resources.GetObject("viewsLabel.Image"))); 81 82 this.viewsLabel.Location = new System.Drawing.Point(211, 0); 82 83 this.viewsLabel.Name = "viewsLabel"; … … 91 92 // viewContextMenuStrip 92 93 // 94 this.viewContextMenuStrip.IgnoredViewTypes = ((System.Collections.Generic.IEnumerable<System.Type>)(resources.GetObject("viewContextMenuStrip.IgnoredViewTypes"))); 93 95 this.viewContextMenuStrip.Item = null; 94 96 this.viewContextMenuStrip.Name = "viewContextMenuStrip"; -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs
r3646 r3655 41 41 } 42 42 43 private bool viewShown; 43 44 private Dictionary<Type, IContentView> cachedViews; 44 45 public IEnumerable<IContentView> Views { … … 138 139 throw new InvalidOperationException(string.Format("View \"{0}\" cannot display content \"{1}\".", 139 140 viewType, Content.GetType())); 140 if (viewPanel.Height <= 10 || viewPanel.Width <= 10) 141 if (viewPanel.Height <= 10 || viewPanel.Width <= 10) { 142 viewShown = false; 141 143 return; 142 144 } 145 146 viewShown = true; 143 147 UpdateActiveMenuItem(); 144 148 IContentView view; … … 159 163 } 160 164 165 private void viewPanel_Resize(object sender, EventArgs e) { 166 if (!viewShown) 167 this.OnViewTypeChanged(); 168 } 169 161 170 private void RegisterActiveViewEvents() { 162 171 activeView.Changed += new EventHandler(activeView_Changed);
Note: See TracChangeset
for help on using the changeset viewer.