Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/13/09 18:21:26 (16 years ago)
Author:
bspisic
Message:

#520 Renamed ViewPropertiesModel to ViewSettings and moved from LineChart to ChartDataRowsModel

File:
1 edited

Legend:

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

    r1337 r1341  
    1919    private readonly Dictionary<IDataRow, RowEntry> rowToRowEntry = new Dictionary<IDataRow, RowEntry>();
    2020
     21    private readonly ViewSettings viewSettings;
     22
    2123//    private readonly Stack<RectangleD> clippingAreaHistory = new Stack<RectangleD>();
    2224    private readonly WorldShape userInteractionShape = new WorldShape();
     
    2931    private bool zoomToFullView;
    3032
    31     private readonly ViewPropertiesModel viewPropertiesModel;
    3233
    3334    /// <summary>
     
    5051
    5152      this.model = model;
    52       viewPropertiesModel = new ViewPropertiesModel(titleShape.Font, titleShape.Color, legendShape.Font, legendShape.Color, xAxis.Font, xAxis.Color);
    53       viewPropertiesModel.OnUpdateProperties += UpdateViewProperties;
     53      viewSettings = model.ViewSettings;
     54      viewSettings.OnUpdateSettings += UpdateViewProperties;
    5455
    5556      Item = model;
     
    6263
    6364    private void UpdateViewProperties() {
    64       titleShape.Font = viewPropertiesModel.TitleFont;
    65       titleShape.Color = viewPropertiesModel.TitleColor;
    66 
    67       legendShape.Font = viewPropertiesModel.LegendFont;
    68       legendShape.Color = viewPropertiesModel.LegendColor;
    69 
    70       xAxis.Font = viewPropertiesModel.XAxisFont;
    71       xAxis.Color = viewPropertiesModel.XAxisColor;
     65      titleShape.Font = viewSettings.TitleFont;
     66      titleShape.Color = viewSettings.TitleColor;
     67
     68      legendShape.Font = viewSettings.LegendFont;
     69      legendShape.Color = viewSettings.LegendColor;
     70
     71      xAxis.Font = viewSettings.XAxisFont;
     72      xAxis.Color = viewSettings.XAxisColor;
    7273
    7374      canvasUI.Invalidate();
     
    145146
    146147    private void optionsToolStripMenuItem_Click(object sender, EventArgs e) {
    147       OptionsDialog optionsdlg = new OptionsDialog(this.model, viewPropertiesModel);
     148      OptionsDialog optionsdlg = new OptionsDialog(model);
    148149      optionsdlg.ShowDialog(this);
    149150    }
Note: See TracChangeset for help on using the changeset viewer.