Changeset 1233 for trunk/sources/HeuristicLab.Visualization/Options
- Timestamp:
- 02/28/09 21:21:59 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.cs
r1195 r1233 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.ComponentModel;4 using System.Data;5 using System.Drawing;6 using System.Linq;7 using System.Text;8 3 using System.Windows.Forms; 9 4 10 5 namespace HeuristicLab.Visualization.Options { 11 6 public partial class OptionsDialog : Form { 12 13 7 private LineChart lc; 14 8 … … 18 12 } 19 13 20 21 14 private void button1_Click(object sender, EventArgs e) { 22 vardlg = new ColorDialog();15 ColorDialog dlg = new ColorDialog(); 23 16 dlg.ShowDialog(); 24 17 this.ColorPreviewTB.BackColor = dlg.Color; … … 44 37 45 38 private void LineSelectCB_SelectedIndexChanged(object sender, EventArgs e) { 46 int index = this.LineThicknessCB.FindStringExact(((IDataRow) this.LineSelectCB.SelectedValue).Thickness.ToString()); 39 IDataRow datarow = (IDataRow)this.LineSelectCB.SelectedValue; 40 41 int index = this.LineThicknessCB.FindStringExact(datarow.Thickness.ToString()); 47 42 this.LineThicknessCB.SelectedIndex = index; 48 index = this.LinestyleCB.FindStringExact( ((IDataRow) this.LineSelectCB.SelectedValue).Style.ToString());43 index = this.LinestyleCB.FindStringExact(datarow.Style.ToString()); 49 44 LinestyleCB.SelectedIndex = index; 50 this.ColorPreviewTB.BackColor = ((IDataRow) this.LineSelectCB.SelectedValue).Color;45 this.ColorPreviewTB.BackColor = datarow.Color; 51 46 } 52 47 … … 56 51 57 52 private void OptionsDialogOkButton_Click(object sender, EventArgs e) { 58 ((IDataRow) this.LineSelectCB.SelectedValue).Thickness = (int) this.LineThicknessCB.SelectedItem; 59 ((IDataRow) this.LineSelectCB.SelectedValue).Color = this.ColorPreviewTB.BackColor; 60 ((IDataRow) this.LineSelectCB.SelectedValue).Style = (DrawingStyle) this.LineThicknessCB.SelectedItem; 61 this.lc.ApplyChangesToRow((IDataRow) this.LineSelectCB.SelectedValue); 53 IDataRow datarow = (IDataRow)this.LineSelectCB.SelectedValue; 54 55 datarow.Thickness = (int)this.LineThicknessCB.SelectedItem; 56 datarow.Color = this.ColorPreviewTB.BackColor; 57 datarow.Style = (DrawingStyle)this.LineThicknessCB.SelectedItem; 58 59 this.lc.ApplyChangesToRow(datarow); 62 60 this.Close(); 63 61 }
Note: See TracChangeset
for help on using the changeset viewer.