Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/28/09 21:21:59 (15 years ago)
Author:
mstoeger
Message:

General housekeeping (#498) Removed some old unused Z-Order values. Replaced some var types by concrete types. Renamed some LineShape properties. Added caching of Pens and Brushes in LineShape and RectangleShape. Put axis tick calculation algorithm into its own class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/LineChart.cs

    r1195 r1233  
    22using System.Collections.Generic;
    33using System.Drawing;
    4 using System.Drawing.Drawing2D;
    54using System.Windows.Forms;
    65using HeuristicLab.Core;
     6using HeuristicLab.Visualization.Legend;
    77using HeuristicLab.Visualization.Options;
    88
     
    6565      root.AddShape(titleShape);
    6666
    67       minMaxLineShape = new MinMaxLineShape(this.minDataValue, this.maxDataValue, 0, Color.Yellow, 4, DrawingStyle.Solid);
     67      minMaxLineShape = new MinMaxLineShape(this.minDataValue, this.maxDataValue, Color.Yellow, 4, DrawingStyle.Solid);
    6868      root.AddShape(minMaxLineShape);
    6969
     
    207207      }
    208208      for (int i = 1; i < row.Count; i++) {
    209         LineShape lineShape = new LineShape(i - 1, row[i - 1], i, row[i], 0, row.Color, row.Thickness, row.Style);
     209        LineShape lineShape = new LineShape(i - 1, row[i - 1], i, row[i], row.Color, row.Thickness, row.Style);
    210210        lineShapes.Add(lineShape);
    211211        // TODO each DataRow needs its own WorldShape so Y Axes can be zoomed independently.
     
    246246          maxDataRowCount = row.Count;
    247247        }
    248         LineShape lineShape = new LineShape(index - 1, row[index - 1], index, row[index], 0, row.Color, row.Thickness,
     248        LineShape lineShape = new LineShape(index - 1, row[index - 1], index, row[index], row.Color, row.Thickness,
    249249                                            row.Style);
    250250        lineShapes.Add(lineShape);
     
    412412
    413413    private void optionsToolStripMenuItem_Click(object sender, EventArgs e) {
    414       var optionsdlg = new OptionsDialog(this);
    415       optionsdlg.Show();
     414      OptionsDialog optionsdlg = new OptionsDialog(this);
     415      optionsdlg.ShowDialog(this);
    416416    }
    417417
    418418    public void ApplyChangesToRow(IDataRow row) {
    419       foreach (var ls in rowToLineShapes[row]) {
     419      foreach (LineShape ls in rowToLineShapes[row]) {
    420420        ls.LSColor = row.Color;
    421421        ls.LSThickness = row.Thickness;
    422         if (row.Style == DrawingStyle.Dashed) {
    423           ls.LSDashStyle = DashStyle.Dash;
    424         }
    425         else {
    426           ls.LSDashStyle = DashStyle.Solid; //default
    427         }
     422        ls.LSDrawingStyle = row.Style;
    428423      }
    429424      canvas.Invalidate();
Note: See TracChangeset for help on using the changeset viewer.