Free cookie consent management tool by TermsFeed Policy Generator

Changeset 684


Ignore:
Timestamp:
10/17/08 20:15:12 (16 years ago)
Author:
mstoeger
Message:

added DataChanged event to IChartDataRowsModel. (#316)

Location:
trunk/sources/HeuristicLab.Visualization
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/HeuristicLab.Visualization.csproj

    r683 r684  
    5858      <DependentUpon>CanvasUI.cs</DependentUpon>
    5959    </Compile>
     60    <Compile Include="ChangeType.cs" />
    6061    <Compile Include="ChartDataModelBase.cs" />
    6162    <Compile Include="ChartDataRowsModel.cs" />
     63    <Compile Include="ChartDataRowsModelDataChangedHandler.cs" />
    6264    <Compile Include="ChartDataRowsModelDummy.cs" />
    6365    <Compile Include="CompositeShape.cs" />
     
    9294    </ProjectReference>
    9395  </ItemGroup>
     96  <ItemGroup>
     97    <EmbeddedResource Include="LineChart.resx">
     98      <DependentUpon>LineChart.cs</DependentUpon>
     99    </EmbeddedResource>
     100  </ItemGroup>
    94101  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    95102  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • trunk/sources/HeuristicLab.Visualization/IChartDataRowsModel.cs

    r680 r684  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
    5 
    6 namespace HeuristicLab.Visualization {
    7   interface IChartDataRowsModel {
     1namespace HeuristicLab.Visualization {
     2  public interface IChartDataRowsModel {
     3    event ChartDataRowsModelDataChangedHandler DataChanged;
    84  }
    95}
  • trunk/sources/HeuristicLab.Visualization/LineChart.Designer.cs

    r683 r684  
    2929        private void InitializeComponent()
    3030        {
    31             components = new System.ComponentModel.Container();
     31            this.SuspendLayout();
     32            //
     33            // LineChart
     34            //
     35            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    3236            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     37            this.Name = "LineChart";
     38            this.Size = new System.Drawing.Size(552, 390);
     39            this.ResumeLayout(false);
     40
    3341        }
    3442
  • trunk/sources/HeuristicLab.Visualization/LineChart.cs

    r683 r684  
    11using System;
    2 using System.Collections.Generic;
    3 using System.ComponentModel;
    4 using System.Drawing;
    5 using System.Data;
    6 using System.Linq;
    7 using System.Text;
    82using System.Windows.Forms;
    93
    10 namespace HeuristicLab.Visualization
    11 {
    12     public partial class LineChart : UserControl
    13     {
    14         public LineChart()
    15         {
    16             InitializeComponent();
     4namespace HeuristicLab.Visualization {
     5  public partial class LineChart : UserControl {
     6    private IChartDataRowsModel model;
     7
     8    public LineChart() {
     9      InitializeComponent();
     10    }
     11
     12    public IChartDataRowsModel Model {
     13      get { return model; }
     14      set {
     15        if (value == null) {
     16          throw new NullReferenceException("Model cannot be null.");
    1717        }
     18
     19        if (model != null) {
     20          throw new InvalidOperationException("Model has already been set.");
     21        }
     22
     23        model = value;
     24
     25        model.DataChanged += OnDataChanged;
     26      }
    1827    }
     28
     29    private void OnDataChanged(ChangeType type, int dataId, double[] values) {
     30      throw new NotImplementedException();
     31    }
     32  }
    1933}
Note: See TracChangeset for help on using the changeset viewer.