Changeset 13122
- Timestamp:
- 11/05/15 13:07:08 (9 years ago)
- Location:
- branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartControl.cs
r13115 r13122 55 55 56 56 private ChartMode mode; 57 private ChartMode defaultMode; 57 58 public ChartMode Mode { 58 59 get { return mode; } … … 60 61 if (mode == value) return; 61 62 mode = value; 63 if (defaultMode == null) defaultMode = mode; 64 if (mode == null) mode = defaultMode; 62 65 SetModeButtonCheckedState(); 63 66 SetModeMenuItemCheckedState(); -
branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartMode.cs
r13115 r13122 45 45 } 46 46 47 public virtual void HandleOnKeyDown(object sender, KeyEventArgs e) { } 47 public void Select() { chartControl.Mode = this; } 48 public void Deselect() { chartControl.Mode = null; } 49 50 public virtual void HandleOnKeyDown(object sender, KeyEventArgs e) { 51 switch (e.KeyCode) { 52 case Keys.Escape: 53 Deselect(); 54 break; 55 } 56 } 57 48 58 public virtual void HandleOnKeyUp(object sender, KeyEventArgs e) { } 49 59 public virtual void HandleOnMouseClick(object sender, MouseEventArgs e) { } 50 60 public virtual void HandleOnMouseDoubleClick(object sender, MouseEventArgs e) { } 51 public virtual void HandleOnMouseWheel(object sender, MouseEventArgs e) { }52 61 53 62 public virtual void HandleOnMouseDown(object sender, MouseEventArgs e) { … … 62 71 } 63 72 73 public virtual void HandleOnMouseWheel(object sender, MouseEventArgs e) { } 64 74 public virtual void HandleOnMouseEnter(object sender, EventArgs e) { } 65 75 public virtual void HandleOnMouseLeave(object sender, EventArgs e) { } -
branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartModes/SelectChartMode.cs
r13115 r13122 37 37 switch (e.KeyCode) { 38 38 case Keys.Delete: 39 if (e.KeyCode == Keys.Delete) { 40 try { 41 chartControl.SuspendRendering(); 42 foreach (var primitive in chartControl.Chart.Group.SelectedPrimitives) 43 chartControl.Chart.Group.Remove(primitive); 44 } finally { chartControl.ResumeRendering(); } 45 } 39 try { 40 chartControl.SuspendRendering(); 41 foreach (var primitive in chartControl.Chart.Group.SelectedPrimitives) 42 chartControl.Chart.Group.Remove(primitive); 43 } finally { chartControl.ResumeRendering(); } 44 46 45 break; 47 46 }
Note: See TracChangeset
for help on using the changeset viewer.