Changeset 1972 for trunk/sources/HeuristicLab.Visualization/3.2
- Timestamp:
- 05/30/09 12:19:16 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization/3.2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/3.2/DataRow.cs
r1962 r1972 32 32 this.RowSettings.Color = color; 33 33 this.RowSettings.Thickness = thickness; 34 this. Style = style;34 this.RowSettings.Style = style; 35 35 this.dataRow = dataRow; 36 this. ShowMarkers = true;36 this.RowSettings.ShowMarkers = true; 37 37 } 38 38 … … 41 41 this.RowSettings.Color = color; 42 42 this.RowSettings.Thickness = thickness; 43 this. Style = style;44 this. ShowMarkers = showMarkers;43 this.RowSettings.Style = style; 44 this.RowSettings.ShowMarkers = showMarkers; 45 45 this.dataRow = dataRow; 46 46 } -
trunk/sources/HeuristicLab.Visualization/3.2/DataRowBase.cs
r1962 r1972 6 6 //private Color color = Color.Black; 7 7 //private int thickness = 2; 8 private DrawingStyle style = DrawingStyle.Solid;9 private DataRowType lineType = DataRowType.Normal;8 // private DrawingStyle style = DrawingStyle.Solid; 9 // private DataRowType lineType = DataRowType.Normal; 10 10 private YAxisDescriptor yAxis; 11 private bool showMarkers = true;11 // private bool showMarkers = true; 12 12 13 private DataRowSettings rowSettings = new DataRowSettings();13 private DataRowSettings rowSettings ; 14 14 15 15 public DataRowSettings RowSettings { 16 16 get { return rowSettings; } 17 set { rowSettings = value; } 17 set { 18 rowSettings.DataVisualSettingChanged -= value_DataVisualSettingChanged; 19 value.DataVisualSettingChanged += value_DataVisualSettingChanged; 20 rowSettings = value; 21 } 18 22 } 19 23 20 public bool ShowMarkers { 21 get { return showMarkers; } 22 set { 23 showMarkers = value; 24 OnDataRowChanged(this); 25 } 26 } 24 public DataRowBase() { 25 rowSettings = new DataRowSettings(); 26 rowSettings.DataVisualSettingChanged += value_DataVisualSettingChanged; 27 } 28 29 void value_DataVisualSettingChanged(DataRowSettings row) { 30 OnDataRowChanged(this); 31 } 32 33 // public bool ShowMarkers { 34 // get { return showMarkers; } 35 // set { 36 // showMarkers = value; 37 // OnDataRowChanged(this); 38 // } 39 // } 27 40 28 41 // public string Label { … … 50 63 // } 51 64 52 public DrawingStyle Style {53 get { return style; }54 set {55 style = value;56 OnDataRowChanged(this);57 }58 }59 60 public DataRowType LineType {61 get { return lineType; }62 set {63 lineType = value;64 OnDataRowChanged(this);65 }66 }65 // public DrawingStyle Style { 66 // get { return style; } 67 // set { 68 // style = value; 69 // OnDataRowChanged(this); 70 // } 71 // } 72 // 73 // public DataRowType LineType { 74 // get { return lineType; } 75 // set { 76 // lineType = value; 77 // OnDataRowChanged(this); 78 // } 79 // } 67 80 68 81 public YAxisDescriptor YAxis { -
trunk/sources/HeuristicLab.Visualization/3.2/IDataRow.cs
r1962 r1972 11 11 //Color Color { get; set; } 12 12 //int Thickness { get; set; } 13 DrawingStyle Style { get; set; }14 DataRowType LineType { get; set; }15 bool ShowMarkers { get; set; }13 // DrawingStyle Style { get; set; } 14 // DataRowType LineType { get; set; } 15 // bool ShowMarkers { get; set; } 16 16 DataRowSettings RowSettings { get; set; } 17 17 -
trunk/sources/HeuristicLab.Visualization/3.2/Options/DataRowSettings.cs
r1962 r1972 4 4 public class DataRowSettings { 5 5 public event UpdateDataRowSettingsHandler OnUpdateDataRowSettings; 6 public event DataVisualSettingChangedHandler DataVisualSettingChanged; 6 7 7 8 private string label; … … 36 37 } 37 38 38 // public bool ShowMarkers {39 // get { return showMarkers; }40 // set {41 // showMarkers = value;42 // //OnDataRowChanged(this);43 // }44 // }45 46 39 public string Label { 47 40 get { return label; } 48 41 set { 49 42 label = value; 50 //OnDataRowChanged(this);43 OnDataVisualSettingChanged(this); 51 44 } 52 45 } 53 46 54 47 public Color Color { 55 48 get { return color; } 56 49 set { 57 50 color = value; 58 //OnDataRowChanged(this);51 OnDataVisualSettingChanged(this); 59 52 } 60 53 } … … 64 57 set { 65 58 thickness = value; 66 //OnDataRowChanged(this);59 OnDataVisualSettingChanged(this); 67 60 } 68 61 } 69 62 70 // public DrawingStyle Style { 71 // get { return style; } 72 // set { 73 // style = value; 74 // //OnDataRowChanged(this); 75 // } 76 // } 77 // 78 // public DataRowType LineType { 79 // get { return lineType; } 80 // set { 81 // lineType = value; 82 // //OnDataRowChanged(this); 83 // } 84 // } 63 public DrawingStyle Style { 64 get { return style; } 65 set { 66 style = value; 67 OnDataVisualSettingChanged(this); 68 } 69 } 70 71 public DataRowType LineType { 72 get { return lineType; } 73 set { 74 lineType = value; 75 OnDataVisualSettingChanged(this); 76 } 77 } 78 79 public bool ShowMarkers { 80 get { return showMarkers; } 81 set { 82 showMarkers = value; 83 OnDataVisualSettingChanged(this); 84 } 85 } 86 87 protected void OnDataVisualSettingChanged(DataRowSettings row) { 88 if (DataVisualSettingChanged != null) { 89 DataVisualSettingChanged(this); 90 } 91 } 92 85 93 } 86 94 public delegate void UpdateDataRowSettingsHandler(); 95 public delegate void DataVisualSettingChangedHandler(DataRowSettings row); 87 96 } -
trunk/sources/HeuristicLab.Visualization/3.2/Options/Options.cs
r1962 r1972 29 29 Color = row.RowSettings.Color; 30 30 Thickness = row.RowSettings.Thickness; 31 Style = row. Style;31 Style = row.RowSettings.Style; 32 32 this.row = row; 33 this.ShowMarkers = row. ShowMarkers;33 this.ShowMarkers = row.RowSettings.ShowMarkers; 34 34 } 35 35 … … 38 38 row.RowSettings.Color = Color; 39 39 row.RowSettings.Thickness = Thickness; 40 row. Style = Style;41 row. ShowMarkers = this.ShowMarkers;40 row.RowSettings.Style = Style; 41 row.RowSettings.ShowMarkers = this.ShowMarkers; 42 42 } 43 43 } … … 170 170 LineThicknessCB.DataSource = GetThicknesses(); 171 171 LinestyleCB.DataSource = GetStyles(); 172 LinestyleCB.SelectedItem = model.Rows[0]. Style;172 LinestyleCB.SelectedItem = model.Rows[0].RowSettings.Style; 173 173 LineThicknessCB.SelectedItem = model.Rows[0].RowSettings.Thickness; 174 MarkercheckBox.Checked = model.Rows[0]. ShowMarkers;174 MarkercheckBox.Checked = model.Rows[0].RowSettings.ShowMarkers; 175 175 176 176 LineSelectCB.DataSource = model.Rows; … … 216 216 LinestyleCB.SelectedIndex = index; */ 217 217 LineThicknessCB.SelectedItem = ((IDataRow)LineSelectCB.SelectedValue).RowSettings.Thickness; 218 LinestyleCB.SelectedItem = ((IDataRow)LineSelectCB.SelectedValue). Style;218 LinestyleCB.SelectedItem = ((IDataRow)LineSelectCB.SelectedValue).RowSettings.Style; 219 219 selectedLineColorSelection.Color = ((IDataRow)LineSelectCB.SelectedValue).RowSettings.Color; 220 MarkercheckBox.Checked = ((IDataRow)LineSelectCB.SelectedValue). ShowMarkers;220 MarkercheckBox.Checked = ((IDataRow)LineSelectCB.SelectedValue).RowSettings.ShowMarkers; 221 221 } 222 222 } … … 229 229 private void LinestyleCB_SelectedIndexChanged(object sender, EventArgs e) { 230 230 if (LineSelectCB.SelectedValue != null) { 231 ((IDataRow)LineSelectCB.SelectedValue). Style = (DrawingStyle)LinestyleCB.SelectedItem;231 ((IDataRow)LineSelectCB.SelectedValue).RowSettings.Style = (DrawingStyle)LinestyleCB.SelectedItem; 232 232 } 233 233 } … … 241 241 private void MarkercheckBox_CheckedChanged(object sender, EventArgs e) { 242 242 if (LineSelectCB.SelectedValue != null) { 243 ((IDataRow)LineSelectCB.SelectedValue). ShowMarkers = MarkercheckBox.Checked;243 ((IDataRow)LineSelectCB.SelectedValue).RowSettings.ShowMarkers = MarkercheckBox.Checked; 244 244 } 245 245 }
Note: See TracChangeset
for help on using the changeset viewer.