Changeset 726
- Timestamp:
- 11/09/08 19:21:25 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/ChartDataRowsModel.cs
r697 r726 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.IO; 3 4 using System.Linq; 5 using System.Runtime.Serialization; 4 6 using System.Text; 5 using System.Collections.Specialized; 7 //using System.Collections.Specialized; 8 using System.Xml; 9 using System.Xml.Serialization; 10 using HeuristicLab.Core; 11 using HeuristicLab.Data; 6 12 7 13 … … 9 15 public class ChartDataRowsModel : ChartDataModelBase, IChartDataRowsModel { 10 16 11 private readonly ListDictionary dataRows;17 private IntData test = new IntData(1); 12 18 13 19 public ChartDataRowsModel(){ 14 20 15 dataRows = new ListDictionary(); 21 columns = new List<ChartDataRowsModelColumn>(); 22 23 16 24 } 17 25 18 26 public void AddDataRow(int id){ 19 List<double> row = new List<double>();20 27 21 dataRows.Add(id, row); 28 double[] vals = new double[]{}; 29 30 ChartDataRowsModelColumn col = new ChartDataRowsModelColumn(id, vals); 31 32 columns.Add(col); 22 33 } 23 34 24 35 public void PushData(int dataRowId, double value){ 25 ((List<double>)dataRows[dataRowId]).Add(value);26 36 37 columns[dataRowId].Values[columns[dataRowId].Values.Length+1] = value; 38 } 39 40 public override IView CreateView() { 41 return new IntDataView(test); 27 42 } 28 43 … … 35 50 } 36 51 52 private List<ChartDataRowsModelColumn> columns; 53 37 54 public List<ChartDataRowsModelColumn> Columns { 38 get { throw new NotImplementedException(); }55 get { return columns; } 39 56 } 57 58 59 60 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 61 62 XmlNode node = base.GetXmlNode(name, document, persistedObjects); 63 64 foreach (ChartDataRowsModelColumn column in Columns){ 65 XmlNode child = document.CreateNode(XmlNodeType.Element, "column", null); 66 child.InnerText = "xx"; 67 node.AppendChild(child); 68 } 69 70 //node.InnerText = "test1"; 71 //test.Data = 11; 72 return node; 73 74 } 75 76 77 /* 78 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) { 79 base.Populate(node, restoredObjects); 80 //Data = bool.Parse(node.InnerText); 81 } 82 */ 40 83 } 41 84 } -
trunk/sources/HeuristicLab.Visualization/ChartDataRowsModelColumn.cs
r697 r726 1 1 namespace HeuristicLab.Visualization { 2 2 public class ChartDataRowsModelColumn { 3 public readonlyint ColumnId;4 public readonlydouble[] Values;3 public int ColumnId; 4 public double[] Values; 5 5 6 6 public ChartDataRowsModelColumn(int columnId, double[] values) { -
trunk/sources/HeuristicLab.Visualization/ChartDataRowsModelDummy.cs
r685 r726 5 5 6 6 namespace HeuristicLab.Visualization { 7 class ChartDataRowsModelDummy : ChartDataRowsModel {7 public class ChartDataRowsModelDummy : ChartDataRowsModel { 8 8 9 public ChartDataRowsModelDummy(){ 10 11 // test rows 12 AddDataRow(1); 13 AddDataRow(2); 14 AddDataRow(3); 15 16 } 9 17 10 18 } -
trunk/sources/HeuristicLab.Visualization/HeuristicLab.Visualization.csproj
r724 r726 4 4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 5 5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 6 <ProductVersion>9.0. 30729</ProductVersion>6 <ProductVersion>9.0.21022</ProductVersion> 7 7 <SchemaVersion>2.0</SchemaVersion> 8 8 <ProjectGuid>{E392A1E2-DC95-4E33-B82E-8ED690EDA1AB}</ProjectGuid> … … 95 95 <Name>HeuristicLab.Core</Name> 96 96 </ProjectReference> 97 <ProjectReference Include="..\HeuristicLab.Data\HeuristicLab.Data.csproj"> 98 <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project> 99 <Name>HeuristicLab.Data</Name> 100 </ProjectReference> 97 101 <ProjectReference Include="..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj"> 98 102 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
Note: See TracChangeset
for help on using the changeset viewer.