Changeset 1345 for trunk/sources/HeuristicLab.Visualization
- Timestamp:
- 03/13/09 19:28:05 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/LineChart.cs
r1343 r1345 72 72 xAxis.Color = viewSettings.XAxisColor; 73 73 74 switch (viewSettings.LegendPosition) { 75 case LegendPosition.Bottom: 76 setLegendBottom(); 77 break; 78 79 case LegendPosition.Top: 80 setLegendTop(); 81 break; 82 83 case LegendPosition.Left: 84 setLegendLeft(); 85 break; 86 87 case LegendPosition.Right: 88 setLegendRight(); 89 break; 90 } 74 SetLegendPosition(); 91 75 92 76 canvasUI.Invalidate(); … … 155 139 linesAreaBoundingBox.Y1); 156 140 157 setLegendBottom(); 141 SetLegendPosition(); 142 } 143 144 private void SetLegendPosition() { 145 switch (viewSettings.LegendPosition) { 146 case LegendPosition.Bottom: 147 setLegendBottom(); 148 break; 149 150 case LegendPosition.Top: 151 setLegendTop(); 152 break; 153 154 case LegendPosition.Left: 155 setLegendLeft(); 156 break; 157 158 case LegendPosition.Right: 159 setLegendRight(); 160 break; 161 } 158 162 } 159 163 -
trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.Designer.cs
r1343 r1345 149 149 this.cbLegendPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 150 150 this.cbLegendPosition.FormattingEnabled = true; 151 this.cbLegendPosition.Items.AddRange(new object[] {152 "left",153 "right",154 "top",155 "bottom"});156 151 this.cbLegendPosition.Location = new System.Drawing.Point(96, 35); 157 152 this.cbLegendPosition.Name = "cbLegendPosition"; -
trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.cs
r1343 r1345 14 14 this.model = model; 15 15 viewSettings = model.ViewSettings; 16 17 cbLegendPosition.Items.Add(LegendPosition.Top); 18 cbLegendPosition.Items.Add(LegendPosition.Bottom); 19 cbLegendPosition.Items.Add(LegendPosition.Left); 20 cbLegendPosition.Items.Add(LegendPosition.Right); 21 22 cbLegendPosition.SelectedItem = viewSettings.LegendPosition; 16 23 } 17 24 … … 91 98 92 99 private void cbLegendPosition_SelectedIndexChanged(object sender, EventArgs e) { 93 string pos = cbLegendPosition.SelectedItem.ToString(); 94 if (pos.Equals("left")) { 95 viewSettings.LegendPosition = LegendPosition.Left; 96 } else if (pos.Equals("right")) { 97 viewSettings.LegendPosition = LegendPosition.Right; 98 } else if (pos.Equals("bottom")) { 99 viewSettings.LegendPosition = LegendPosition.Bottom; 100 } else { 101 viewSettings.LegendPosition = LegendPosition.Top; 102 } 103 100 viewSettings.LegendPosition = (LegendPosition)cbLegendPosition.SelectedItem; 104 101 viewSettings.UpdateView(); 105 102 }
Note: See TracChangeset
for help on using the changeset viewer.