Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13399 for branches


Ignore:
Timestamp:
11/25/15 17:14:14 (9 years ago)
Author:
bburlacu
Message:

#1772: Fix compilation errors caused by changes in the Visualization branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs

    r13061 r13399  
    4343    private Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc> arcMap;
    4444
    45     #region chart modes
     45    #region chart options
    4646    public bool SimpleLineages { get; set; }
    4747    public bool LockGenealogy { get; set; }
    4848    public bool TraceFragments { get; set; }
     49    #endregion
     50
     51    #region chart modes
     52    public Dictionary<string, ChartMode> ChartMode { get; private set; }
    4953    #endregion
    5054
     
    8084    }
    8185
    82     //    public bool UpdateEnabled {
    83     //      get { return Chart.UpdateEnabled; }
    84     //      set { Chart.UpdateEnabled = value; }
    85     //    }
    86 
    87     //    public void EnforceUpdate() {
    88     //      Chart.EnforceUpdate();
    89     //    }
    90 
    9186    private Visualization.Rectangle TargetRectangle { get; set; }
    9287    protected VisualGenealogyGraphNode SelectedVisualNode { get; set; }
     
    112107    public GenealogyGraphChart() {
    113108      InitializeComponent();
     109
     110      ChartMode = new Dictionary<string, ChartMode> {
     111        { "Select", new SelectChartMode(this) },
     112        { "ZoomIn", new ZoomInChartMode(this) },
     113        { "ZoomOut", new ZoomOutChartMode(this) },
     114        { "Pan", new PanChartMode(this) }
     115      };
    114116
    115117      defaultBrush = new SolidBrush(Color.Transparent);
     
    189191        switch (e.Button) {
    190192          case MouseButtons.Left:
    191             Mode = ChartMode.Select;
     193            Mode = ChartMode["Select"];
    192194            Cursor = Cursors.Default;
    193195            break;
    194196          case MouseButtons.Middle:
    195             Mode = ChartMode.Move;
     197            Mode = ChartMode["Pan"];
    196198            Cursor = Cursors.Hand;
    197199            break;
     
    203205    protected override void PictureBoxOnMouseUp(object sender, MouseEventArgs e) {
    204206      Cursor = Cursors.Default;
    205       if (Mode == ChartMode.Move) {
    206         Mode = ChartMode.Select;
    207         return;
    208       }
    209       if (Mode != ChartMode.Select) {
    210         base.PictureBoxOnMouseUp(sender, e);
    211         return;
    212       }
     207
    213208      var primitive = Chart.GetAllPrimitives(e.Location).FirstOrDefault(p => p is VisualGenealogyGraphNode);
    214209      if (primitive == null) {
Note: See TracChangeset for help on using the changeset viewer.