Changeset 3391
- Timestamp:
- 04/18/10 02:31:51 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ViewHost.Designer.cs
r3281 r3391 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 47 this.components = new System.ComponentModel.Container(); 48 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewHost)); 48 49 this.viewPanel = new System.Windows.Forms.Panel(); 49 50 this.messageLabel = new System.Windows.Forms.Label(); 50 51 this.viewsLabel = new System.Windows.Forms.Label(); 52 this.viewContextMenuStrip = new HeuristicLab.MainForm.WindowsForms.ViewContextMenuStrip(); 51 53 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 52 this.viewContextMenuStrip = new HeuristicLab.MainForm.WindowsForms.ViewContextMenuStrip(this.components);53 54 this.SuspendLayout(); 54 55 // … … 82 83 this.viewsLabel.Size = new System.Drawing.Size(16, 16); 83 84 this.viewsLabel.TabIndex = 0; 84 this.toolTip.SetToolTip(this.viewsLabel, "Double-click to open a new window of the current view." + System.Environment.NewLine + "Right-click to change current view."); 85 this.toolTip.SetToolTip(this.viewsLabel, "Double-click to open a new window of the current view.\r\nRight-click to change cur" + 86 "rent view."); 87 this.viewsLabel.MouseLeave += new System.EventHandler(this.viewsLabel_MouseLeave); 85 88 this.viewsLabel.DoubleClick += new System.EventHandler(this.viewsLabel_DoubleClick); 89 this.viewsLabel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.viewsLabel_MouseDown); 86 90 // 87 91 // viewContextMenuStrip 88 92 // 93 this.viewContextMenuStrip.IgnoredViewTypes = ((System.Collections.Generic.IEnumerable<System.Type>)(resources.GetObject("viewContextMenuStrip.IgnoredViewTypes"))); 89 94 this.viewContextMenuStrip.Item = null; 90 95 this.viewContextMenuStrip.Name = "viewContextMenuStrip"; -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ViewHost.cs
r3389 r3391 35 35 viewType = null; 36 36 Content = null; 37 startDragAndDrop = false; 37 38 viewContextMenuStrip.IgnoredViewTypes = new List<Type>() { typeof(ViewHost) }; 38 39 } … … 164 165 ViewType = viewType; 165 166 } 167 168 private bool startDragAndDrop; 169 private void viewsLabel_MouseDown(object sender, MouseEventArgs e) { 170 startDragAndDrop = true; 171 viewsLabel.Capture = false; 172 } 173 174 private void viewsLabel_MouseLeave(object sender, EventArgs e) { 175 if ((Control.MouseButtons & MouseButtons.Left) == MouseButtons.Left && startDragAndDrop) { 176 DataObject data = new DataObject(); 177 data.SetData("Type", Content.GetType()); 178 data.SetData("Value", Content); 179 DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link); 180 } else 181 startDragAndDrop = false; 182 } 166 183 } 167 184 }
Note: See TracChangeset
for help on using the changeset viewer.