Free cookie consent management tool by TermsFeed Policy Generator

Changeset 985


Ignore:
Timestamp:
12/12/08 19:35:06 (16 years ago)
Author:
bspisic
Message:

#424
Implemented ResetView

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization.Test/LineChartTestForm.Designer.cs

    r861 r985  
    2525    private void InitializeComponent() {
    2626      this.lineChartGroupBox = new System.Windows.Forms.GroupBox();
     27      this.btnResetView = new System.Windows.Forms.Button();
    2728      this.SuspendLayout();
    2829      //
     
    3940      this.lineChartGroupBox.Text = "Line Chart";
    4041      //
     42      // btnResetView
     43      //
     44      this.btnResetView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     45      this.btnResetView.Location = new System.Drawing.Point(544, 346);
     46      this.btnResetView.Name = "btnResetView";
     47      this.btnResetView.Size = new System.Drawing.Size(75, 23);
     48      this.btnResetView.TabIndex = 1;
     49      this.btnResetView.Text = "Reset View";
     50      this.btnResetView.UseVisualStyleBackColor = true;
     51      this.btnResetView.Click += new System.EventHandler(this.btnResetView_Click);
     52      //
    4153      // LineChartTestForm
    4254      //
     
    4456      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    4557      this.ClientSize = new System.Drawing.Size(631, 395);
     58      this.Controls.Add(this.btnResetView);
    4659      this.Controls.Add(this.lineChartGroupBox);
    4760      this.Name = "LineChartTestForm";
     
    5467
    5568    private System.Windows.Forms.GroupBox lineChartGroupBox;
     69    private System.Windows.Forms.Button btnResetView;
    5670
    5771  }
  • trunk/sources/HeuristicLab.Visualization.Test/LineChartTestForm.cs

    r861 r985  
    55  public partial class LineChartTestForm : Form {
    66    private ChartDataRowsModel model;
     7    private IView view;
    78
    89    public LineChartTestForm() {
     
    1112      model = new ChartDataRowsModel();
    1213
    13       IView view = model.CreateView();
     14     
     15      view = model.CreateView();
    1416
    1517      Control viewControl = (Control)view;
     
    2224      get { return model; }
    2325    }
     26
     27    private void btnResetView_Click(object sender, System.EventArgs e) {
     28      LineChart lineChart = (LineChart)view;
     29      lineChart.ResetView();
     30    }
    2431  }
    2532}
  • trunk/sources/HeuristicLab.Visualization/LineChart.cs

    r984 r985  
    5454    }
    5555
     56    public void ResetView() {
     57      zoomFullView = true;
     58      ZoomToFullView();
     59      canvasUI1.Invalidate();
     60    }
     61
    5662    #region Add-/RemoveItemEvents
    5763
Note: See TracChangeset for help on using the changeset viewer.