- Timestamp:
- 01/20/12 13:52:51 (13 years ago)
- Location:
- branches/HiveHiveEngine
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveHiveEngine
- Property svn:ignore
- Property svn:mergeinfo changed
/trunk/sources (added) merged: 7294-7295,7297,7304-7306,7318,7327,7333,7335,7341-7342,7351-7353,7369-7370
-
branches/HiveHiveEngine/HeuristicLab.MainForm.WindowsForms/3.3/Controls/DragOverTabControl.Designer.cs
r7259 r7383 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 48 this.timer = new System.Windows.Forms.Timer(this.components); 47 49 this.SuspendLayout(); 50 // 51 // timer 52 // 53 this.timer.Interval = 500; 54 this.timer.Tick += new System.EventHandler(this.timer_Tick); 48 55 // 49 56 // DragOverTabControl … … 56 63 57 64 #endregion 65 66 private System.Windows.Forms.Timer timer; 58 67 } 59 68 } -
branches/HiveHiveEngine/HeuristicLab.MainForm.WindowsForms/3.3/Controls/DragOverTabControl.cs
r7259 r7383 25 25 namespace HeuristicLab.MainForm.WindowsForms { 26 26 public partial class DragOverTabControl : TabControl { 27 private int destinationTabIndex; 28 27 29 public DragOverTabControl() { 28 30 InitializeComponent(); 29 31 } 30 32 31 private void DragOverTabControl_DragOver(object sender, DragEventArgs e) {33 private int GetTabIndex() { 32 34 Point position = PointToClient(Control.MousePosition); 33 35 int tabIndex = -1; … … 36 38 tabIndex = i; 37 39 } 40 return tabIndex; 41 } 38 42 39 if (tabIndex != SelectedIndex && tabIndex != -1) 43 private void DragOverTabControl_DragOver(object sender, DragEventArgs e) { 44 int tabIndex = GetTabIndex(); 45 46 if (!timer.Enabled && tabIndex != SelectedIndex && tabIndex != -1) { 47 destinationTabIndex = tabIndex; 48 timer.Start(); 49 } 50 } 51 52 private void timer_Tick(object sender, System.EventArgs e) { 53 timer.Stop(); 54 int tabIndex = GetTabIndex(); 55 56 if (tabIndex == destinationTabIndex && tabIndex != SelectedIndex && tabIndex != -1) { 40 57 SelectedIndex = tabIndex; 41 58 } 42 59 } 43 60 }
Note: See TracChangeset
for help on using the changeset viewer.