Changeset 9977 for stable/HeuristicLab.MainForm.WindowsForms/3.3/Controls
- Timestamp:
- 09/17/13 10:05:34 (11 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 9915-9916,9920-9921,9935
- Property svn:mergeinfo changed
-
stable/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.Designer.cs
r9456 r9977 51 51 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 52 52 this.configurationLabel = new System.Windows.Forms.Label(); 53 this.helpLabel = new System.Windows.Forms.Label(); 53 54 this.SuspendLayout(); 54 55 // … … 73 74 this.viewsLabel.Size = new System.Drawing.Size(16, 16); 74 75 this.viewsLabel.TabIndex = 0; 75 this.toolTip.SetToolTip(this.viewsLabel, 76 "Double-click to open a new window of the current view." + System.Environment.NewLine + 77 "Right-click to change current view." + System.Environment.NewLine + 78 "Drag icon to copy or link content to another view."); 76 this.toolTip.SetToolTip(this.viewsLabel, "Double-click to open a new window of the current view.\r\nRight-click to change cur" + 77 "rent view.\r\nDrag icon to copy or link content to another view."); 79 78 this.viewsLabel.DoubleClick += new System.EventHandler(this.viewsLabel_DoubleClick); 80 79 this.viewsLabel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.viewsLabel_MouseDown); … … 102 101 this.configurationLabel.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.configurationLabel_DoubleClick); 103 102 // 103 // helpLabel 104 // 105 this.helpLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 106 this.helpLabel.Image = HeuristicLab.Common.Resources.VSImageLibrary.Help; 107 this.helpLabel.Location = new System.Drawing.Point(211, 44); 108 this.helpLabel.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); 109 this.helpLabel.Name = "helpLabel"; 110 this.helpLabel.Size = new System.Drawing.Size(16, 16); 111 this.helpLabel.TabIndex = 3; 112 this.toolTip.SetToolTip(this.helpLabel, "Double-click to open help."); 113 this.helpLabel.Visible = false; 114 this.helpLabel.DoubleClick += new System.EventHandler(this.helpLabel_DoubleClick); 115 // 104 116 // ViewHost 105 117 // 106 118 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 107 119 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 120 this.Controls.Add(this.helpLabel); 108 121 this.Controls.Add(this.viewsLabel); 109 122 this.Controls.Add(this.configurationLabel); … … 121 134 private HeuristicLab.MainForm.WindowsForms.ViewContextMenuStrip viewContextMenuStrip; 122 135 private System.Windows.Forms.Label configurationLabel; 136 private System.Windows.Forms.Label helpLabel; 123 137 124 138 } -
stable/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.cs
r9456 r9977 103 103 configurationLabel.Visible = activeView is IConfigureableView; 104 104 configurationLabel.Enabled = activeView != null && !activeView.Locked; 105 106 helpLabel.Visible = activeView != null && ViewAttribute.HasHelpResourcePath(activeView.GetType()); 107 helpLabel.Top = CalculateHelpLabelPosY(); 105 108 } 106 109 } … … 210 213 viewsLabel.Location = new Point(Width - viewsLabel.Margin.Right - viewsLabel.Width, viewsLabel.Margin.Top); 211 214 configurationLabel.Location = new Point(Width - configurationLabel.Margin.Right - configurationLabel.Width, viewsLabel.Bottom + viewsLabel.Margin.Bottom + configurationLabel.Margin.Top); 212 215 helpLabel.Location = new Point(Width - helpLabel.Margin.Right - helpLabel.Width, CalculateHelpLabelPosY()); 216 } 217 218 private int CalculateHelpLabelPosY() { 219 if (activeView != null && ViewAttribute.HasHelpResourcePath(activeView.GetType()) && !configurationLabel.Visible) { 220 return configurationLabel.Top; 221 } 222 return configurationLabel.Bottom + configurationLabel.Margin.Bottom + helpLabel.Margin.Top; 213 223 } 214 224 … … 302 312 ((IConfigureableView)ActiveView).ShowConfiguration(); 303 313 } 314 315 private void helpLabel_DoubleClick(object sender, EventArgs e) { 316 using (InfoBox dialog = new InfoBox("Help for " + ViewAttribute.GetViewName(ActiveView.GetType()), ViewAttribute.GetHelpResourcePath(ActiveView.GetType()), ActiveView)) { 317 dialog.ShowDialog(this); 318 } 319 } 304 320 #endregion 305 321 }
Note: See TracChangeset
for help on using the changeset viewer.