Changeset 1342 for trunk/sources/HeuristicLab.Visualization/Options
- Timestamp:
- 03/13/09 19:07:53 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization/Options
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.Designer.cs
r1337 r1342 32 32 this.tabPage2 = new System.Windows.Forms.TabPage(); 33 33 this.btnChangeLegendFont = new System.Windows.Forms.Button(); 34 this.l abelposition = new System.Windows.Forms.Label();35 this.cbL abelPosition = new System.Windows.Forms.ComboBox();34 this.legendposition = new System.Windows.Forms.Label(); 35 this.cbLegendPosition = new System.Windows.Forms.ComboBox(); 36 36 this.tabPage1 = new System.Windows.Forms.TabPage(); 37 37 this.OptionsDialogSelectColorBt = new System.Windows.Forms.Button(); … … 113 113 // 114 114 this.tabPage2.Controls.Add(this.btnChangeLegendFont); 115 this.tabPage2.Controls.Add(this.l abelposition);116 this.tabPage2.Controls.Add(this.cbL abelPosition);115 this.tabPage2.Controls.Add(this.legendposition); 116 this.tabPage2.Controls.Add(this.cbLegendPosition); 117 117 this.tabPage2.Location = new System.Drawing.Point(4, 22); 118 118 this.tabPage2.Name = "tabPage2"; … … 133 133 this.btnChangeLegendFont.Click += new System.EventHandler(this.btnChangeLegendFont_Click); 134 134 // 135 // l abelposition136 // 137 this.l abelposition.AutoSize = true;138 this.l abelposition.Location = new System.Drawing.Point(3, 47);139 this.l abelposition.Name = "labelposition";140 this.l abelposition.Size = new System.Drawing.Size(72, 13);141 this.l abelposition.TabIndex = 1;142 this.l abelposition.Text = "Labelposition:";143 // 144 // cbL abelPosition145 // 146 this.cbL abelPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;147 this.cbL abelPosition.FormattingEnabled = true;148 this.cbL abelPosition.Items.AddRange(new object[] {135 // legendposition 136 // 137 this.legendposition.AutoSize = true; 138 this.legendposition.Location = new System.Drawing.Point(8, 38); 139 this.legendposition.Name = "legendposition"; 140 this.legendposition.Size = new System.Drawing.Size(82, 13); 141 this.legendposition.TabIndex = 1; 142 this.legendposition.Text = "Legendposition:"; 143 // 144 // cbLegendPosition 145 // 146 this.cbLegendPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 147 this.cbLegendPosition.FormattingEnabled = true; 148 this.cbLegendPosition.Items.AddRange(new object[] { 149 149 "left", 150 150 "right", 151 151 "top", 152 152 "bottom"}); 153 this.cbLabelPosition.Location = new System.Drawing.Point(81, 44); 154 this.cbLabelPosition.Name = "cbLabelPosition"; 155 this.cbLabelPosition.Size = new System.Drawing.Size(121, 21); 156 this.cbLabelPosition.TabIndex = 0; 153 this.cbLegendPosition.Location = new System.Drawing.Point(96, 35); 154 this.cbLegendPosition.Name = "cbLegendPosition"; 155 this.cbLegendPosition.Size = new System.Drawing.Size(121, 21); 156 this.cbLegendPosition.TabIndex = 0; 157 this.cbLegendPosition.SelectedIndexChanged += new System.EventHandler(this.cbLegendPosition_SelectedIndexChanged); 157 158 // 158 159 // tabPage1 … … 335 336 private System.Windows.Forms.Button btnChangeTitleFont; 336 337 private System.Windows.Forms.TabPage tabPage2; 337 private System.Windows.Forms.Label labelposition;338 private System.Windows.Forms.ComboBox cbLabelPosition;339 338 private System.Windows.Forms.TabPage tabPage1; 340 339 private System.Windows.Forms.Button OptionsDialogSelectColorBt; … … 346 345 private System.Windows.Forms.GroupBox groupBox1; 347 346 private System.Windows.Forms.Label label4; 347 private System.Windows.Forms.ComboBox cbLegendPosition; 348 private System.Windows.Forms.Label legendposition; 348 349 private System.Windows.Forms.ComboBox LineThicknessCB; 349 350 private System.Windows.Forms.Label label3; -
trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.cs
r1341 r1342 2 2 using System.Collections.Generic; 3 3 using System.Windows.Forms; 4 using HeuristicLab.Visualization.Legend; 4 5 5 6 namespace HeuristicLab.Visualization.Options { … … 74 75 } 75 76 77 private void cbLegendPosition_SelectedIndexChanged(object sender, EventArgs e) { 78 string pos = cbLegendPosition.SelectedItem.ToString(); 79 if (pos.Equals("left")) { 80 viewSettings.LegendPosition = LegendPosition.Left; 81 } else if (pos.Equals("right")) { 82 viewSettings.LegendPosition = LegendPosition.Right; 83 } else if (pos.Equals("bottom")) { 84 viewSettings.LegendPosition = LegendPosition.Bottom; 85 } else { 86 viewSettings.LegendPosition = LegendPosition.Top; 87 } 88 89 viewSettings.UpdateView(); 90 } 91 76 92 private void btnChangeTitleFont_Click(object sender, EventArgs e) { 77 93 fdFont.Font = viewSettings.TitleFont; -
trunk/sources/HeuristicLab.Visualization/Options/ViewSettings.cs
r1341 r1342 1 1 using System.Drawing; 2 using HeuristicLab.Visualization.Legend; 2 3 3 4 namespace HeuristicLab.Visualization.Options { … … 11 12 private Font xAxisFont; 12 13 private Color xAxisColor; 14 private LegendPosition legendPosition; 13 15 14 16 public ViewSettings() { … … 21 23 xAxisFont = new Font("Arial", 8); 22 24 xAxisColor = Color.Blue; 25 26 legendPosition = LegendPosition.Left; 23 27 } 24 28 … … 58 62 set { xAxisColor = value; } 59 63 } 64 65 public LegendPosition LegendPosition { 66 get { return legendPosition; } 67 set { legendPosition = value; } 68 } 60 69 } 61 70
Note: See TracChangeset
for help on using the changeset viewer.