Changeset 6016
- Timestamp:
- 04/16/11 11:48:21 (14 years ago)
- Location:
- branches/histogram/HeuristicLab.Analysis.Views/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.Designer.cs
r6014 r6016 54 54 this.label3 = new System.Windows.Forms.Label(); 55 55 this.commonGroupBox = new System.Windows.Forms.GroupBox(); 56 this.axisGroupBox = new System.Windows.Forms.GroupBox(); 57 this.label5 = new System.Windows.Forms.Label(); 58 this.label6 = new System.Windows.Forms.Label(); 59 this.panel1 = new System.Windows.Forms.Panel(); 60 this.yAxisSecondaryRadioButton = new System.Windows.Forms.RadioButton(); 61 this.yAxisPrimaryRadioButton = new System.Windows.Forms.RadioButton(); 56 62 this.panel2 = new System.Windows.Forms.Panel(); 57 63 this.xAxisPrimaryRadioButton = new System.Windows.Forms.RadioButton(); 58 64 this.xAxisSecondaryRadioButton = new System.Windows.Forms.RadioButton(); 59 this.panel1 = new System.Windows.Forms.Panel();60 this.yAxisSecondaryRadioButton = new System.Windows.Forms.RadioButton();61 this.yAxisPrimaryRadioButton = new System.Windows.Forms.RadioButton();62 this.label6 = new System.Windows.Forms.Label();63 65 this.histoGramGroupBox = new System.Windows.Forms.GroupBox(); 64 66 this.panel3 = new System.Windows.Forms.Panel(); … … 71 73 this.lineStyleComboBox = new System.Windows.Forms.ComboBox(); 72 74 this.label8 = new System.Windows.Forms.Label(); 73 this.label5 = new System.Windows.Forms.Label();74 this.axisGroupBox = new System.Windows.Forms.GroupBox();75 75 ((System.ComponentModel.ISupportInitialize)(this.binsNumericUpDown)).BeginInit(); 76 76 this.commonGroupBox.SuspendLayout(); 77 this.axisGroupBox.SuspendLayout(); 78 this.panel1.SuspendLayout(); 77 79 this.panel2.SuspendLayout(); 78 this.panel1.SuspendLayout();79 80 this.histoGramGroupBox.SuspendLayout(); 80 81 this.panel3.SuspendLayout(); 81 82 this.lineChartGroupBox.SuspendLayout(); 82 83 ((System.ComponentModel.ISupportInitialize)(this.lineWidthNumericUpDown)).BeginInit(); 83 this.axisGroupBox.SuspendLayout();84 84 this.SuspendLayout(); 85 85 // … … 180 180 this.commonGroupBox.Text = "Common"; 181 181 // 182 // axisGroupBox 183 // 184 this.axisGroupBox.Controls.Add(this.label5); 185 this.axisGroupBox.Controls.Add(this.label6); 186 this.axisGroupBox.Controls.Add(this.panel1); 187 this.axisGroupBox.Controls.Add(this.panel2); 188 this.axisGroupBox.Location = new System.Drawing.Point(6, 75); 189 this.axisGroupBox.Name = "axisGroupBox"; 190 this.axisGroupBox.Size = new System.Drawing.Size(299, 75); 191 this.axisGroupBox.TabIndex = 9; 192 this.axisGroupBox.TabStop = false; 193 this.axisGroupBox.Text = "Display Data on"; 194 // 195 // label5 196 // 197 this.label5.AutoSize = true; 198 this.label5.Location = new System.Drawing.Point(6, 46); 199 this.label5.Name = "label5"; 200 this.label5.Size = new System.Drawing.Size(39, 13); 201 this.label5.TabIndex = 6; 202 this.label5.Text = "Y Axis:"; 203 // 204 // label6 205 // 206 this.label6.AutoSize = true; 207 this.label6.Location = new System.Drawing.Point(6, 22); 208 this.label6.Name = "label6"; 209 this.label6.Size = new System.Drawing.Size(39, 13); 210 this.label6.TabIndex = 6; 211 this.label6.Text = "X Axis:"; 212 // 213 // panel1 214 // 215 this.panel1.Controls.Add(this.yAxisSecondaryRadioButton); 216 this.panel1.Controls.Add(this.yAxisPrimaryRadioButton); 217 this.panel1.Location = new System.Drawing.Point(63, 40); 218 this.panel1.Name = "panel1"; 219 this.panel1.Size = new System.Drawing.Size(231, 25); 220 this.panel1.TabIndex = 5; 221 // 222 // yAxisSecondaryRadioButton 223 // 224 this.yAxisSecondaryRadioButton.AutoSize = true; 225 this.yAxisSecondaryRadioButton.Location = new System.Drawing.Point(70, 4); 226 this.yAxisSecondaryRadioButton.Name = "yAxisSecondaryRadioButton"; 227 this.yAxisSecondaryRadioButton.Size = new System.Drawing.Size(76, 17); 228 this.yAxisSecondaryRadioButton.TabIndex = 1; 229 this.yAxisSecondaryRadioButton.TabStop = true; 230 this.yAxisSecondaryRadioButton.Text = "Secondary"; 231 this.yAxisSecondaryRadioButton.UseVisualStyleBackColor = true; 232 this.yAxisSecondaryRadioButton.CheckedChanged += new System.EventHandler(this.yAxisRadioButton_CheckedChanged); 233 // 234 // yAxisPrimaryRadioButton 235 // 236 this.yAxisPrimaryRadioButton.AutoSize = true; 237 this.yAxisPrimaryRadioButton.Location = new System.Drawing.Point(4, 4); 238 this.yAxisPrimaryRadioButton.Name = "yAxisPrimaryRadioButton"; 239 this.yAxisPrimaryRadioButton.Size = new System.Drawing.Size(59, 17); 240 this.yAxisPrimaryRadioButton.TabIndex = 0; 241 this.yAxisPrimaryRadioButton.TabStop = true; 242 this.yAxisPrimaryRadioButton.Text = "Primary"; 243 this.yAxisPrimaryRadioButton.UseVisualStyleBackColor = true; 244 this.yAxisPrimaryRadioButton.CheckedChanged += new System.EventHandler(this.yAxisRadioButton_CheckedChanged); 245 // 182 246 // panel2 183 247 // … … 212 276 this.xAxisSecondaryRadioButton.UseVisualStyleBackColor = true; 213 277 this.xAxisSecondaryRadioButton.CheckedChanged += new System.EventHandler(this.xAxisRadioButton_CheckedChanged); 214 //215 // panel1216 //217 this.panel1.Controls.Add(this.yAxisSecondaryRadioButton);218 this.panel1.Controls.Add(this.yAxisPrimaryRadioButton);219 this.panel1.Location = new System.Drawing.Point(63, 40);220 this.panel1.Name = "panel1";221 this.panel1.Size = new System.Drawing.Size(231, 25);222 this.panel1.TabIndex = 5;223 //224 // yAxisSecondaryRadioButton225 //226 this.yAxisSecondaryRadioButton.AutoSize = true;227 this.yAxisSecondaryRadioButton.Location = new System.Drawing.Point(70, 4);228 this.yAxisSecondaryRadioButton.Name = "yAxisSecondaryRadioButton";229 this.yAxisSecondaryRadioButton.Size = new System.Drawing.Size(76, 17);230 this.yAxisSecondaryRadioButton.TabIndex = 1;231 this.yAxisSecondaryRadioButton.TabStop = true;232 this.yAxisSecondaryRadioButton.Text = "Secondary";233 this.yAxisSecondaryRadioButton.UseVisualStyleBackColor = true;234 this.yAxisSecondaryRadioButton.CheckedChanged += new System.EventHandler(this.yAxisRadioButton_CheckedChanged);235 //236 // yAxisPrimaryRadioButton237 //238 this.yAxisPrimaryRadioButton.AutoSize = true;239 this.yAxisPrimaryRadioButton.Location = new System.Drawing.Point(4, 4);240 this.yAxisPrimaryRadioButton.Name = "yAxisPrimaryRadioButton";241 this.yAxisPrimaryRadioButton.Size = new System.Drawing.Size(59, 17);242 this.yAxisPrimaryRadioButton.TabIndex = 0;243 this.yAxisPrimaryRadioButton.TabStop = true;244 this.yAxisPrimaryRadioButton.Text = "Primary";245 this.yAxisPrimaryRadioButton.UseVisualStyleBackColor = true;246 this.yAxisPrimaryRadioButton.CheckedChanged += new System.EventHandler(this.yAxisRadioButton_CheckedChanged);247 //248 // label6249 //250 this.label6.AutoSize = true;251 this.label6.Location = new System.Drawing.Point(6, 22);252 this.label6.Name = "label6";253 this.label6.Size = new System.Drawing.Size(39, 13);254 this.label6.TabIndex = 6;255 this.label6.Text = "X Axis:";256 278 // 257 279 // histoGramGroupBox … … 288 310 this.binsApproximatelyRadioButton.Text = "Approximately"; 289 311 this.binsApproximatelyRadioButton.UseVisualStyleBackColor = true; 290 this.binsApproximatelyRadioButton.CheckedChanged += new System.EventHandler(this. yAxisRadioButton_CheckedChanged);312 this.binsApproximatelyRadioButton.CheckedChanged += new System.EventHandler(this.binNumberRadioButton_CheckedChanged); 291 313 // 292 314 // binsExactRadioButton … … 300 322 this.binsExactRadioButton.Text = "Exact"; 301 323 this.binsExactRadioButton.UseVisualStyleBackColor = true; 302 this.binsExactRadioButton.CheckedChanged += new System.EventHandler(this. yAxisRadioButton_CheckedChanged);324 this.binsExactRadioButton.CheckedChanged += new System.EventHandler(this.binNumberRadioButton_CheckedChanged); 303 325 // 304 326 // lineChartGroupBox … … 374 396 this.label8.Text = "Line Style:"; 375 397 // 376 // label5377 //378 this.label5.AutoSize = true;379 this.label5.Location = new System.Drawing.Point(6, 46);380 this.label5.Name = "label5";381 this.label5.Size = new System.Drawing.Size(39, 13);382 this.label5.TabIndex = 6;383 this.label5.Text = "Y Axis:";384 //385 // axisGroupBox386 //387 this.axisGroupBox.Controls.Add(this.label5);388 this.axisGroupBox.Controls.Add(this.label6);389 this.axisGroupBox.Controls.Add(this.panel1);390 this.axisGroupBox.Controls.Add(this.panel2);391 this.axisGroupBox.Location = new System.Drawing.Point(6, 75);392 this.axisGroupBox.Name = "axisGroupBox";393 this.axisGroupBox.Size = new System.Drawing.Size(299, 75);394 this.axisGroupBox.TabIndex = 9;395 this.axisGroupBox.TabStop = false;396 this.axisGroupBox.Text = "Display Data on";397 //398 398 // DataRowVisualPropertiesControl 399 399 // … … 408 408 this.commonGroupBox.ResumeLayout(false); 409 409 this.commonGroupBox.PerformLayout(); 410 this.axisGroupBox.ResumeLayout(false); 411 this.axisGroupBox.PerformLayout(); 412 this.panel1.ResumeLayout(false); 413 this.panel1.PerformLayout(); 410 414 this.panel2.ResumeLayout(false); 411 415 this.panel2.PerformLayout(); 412 this.panel1.ResumeLayout(false);413 this.panel1.PerformLayout();414 416 this.histoGramGroupBox.ResumeLayout(false); 415 417 this.histoGramGroupBox.PerformLayout(); … … 419 421 this.lineChartGroupBox.PerformLayout(); 420 422 ((System.ComponentModel.ISupportInitialize)(this.lineWidthNumericUpDown)).EndInit(); 421 this.axisGroupBox.ResumeLayout(false);422 this.axisGroupBox.PerformLayout();423 423 this.ResumeLayout(false); 424 424 -
branches/histogram/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs
r6014 r6016 97 97 private void chartTypeComboBox_SelectedValueChanged(object sender, EventArgs e) { 98 98 if (!SuppressEvents && Content != null) { 99 Content.ChartType = (DataRowVisualProperties.DataRowChartType)chartTypeComboBox.SelectedValue; 99 DataRowVisualProperties.DataRowChartType selected = (DataRowVisualProperties.DataRowChartType)chartTypeComboBox.SelectedValue; 100 Content.ChartType = selected; 101 if (Content.ChartType != selected) { 102 MessageBox.Show("There may be incompatibilities with other series or the data is not suited to be displayed as " + selected.ToString() + ".", "Failed to set type to " + selected.ToString()); 103 SuppressEvents = true; 104 try { 105 chartTypeComboBox.SelectedItem = Content.ChartType; 106 } finally { SuppressEvents = false; } 107 } 100 108 SetEnabledStateOfControls(); 101 109 } … … 156 164 SuppressEvents = true; 157 165 try { 158 if (sender == binsApproximatelyRadioButton)159 binsExactRadioButton.Checked = !binsApproximatelyRadioButton.Checked;160 else binsApproximatelyRadioButton.Checked = !binsExactRadioButton.Checked;161 166 Content.ExactBins = binsExactRadioButton.Checked; 162 167 } finally { SuppressEvents = false; } -
branches/histogram/HeuristicLab.Analysis.Views/3.3/DataTableView.cs
r6015 r6016 172 172 break; 173 173 case DataRowVisualProperties.DataRowChartType.Bars: 174 series.ChartType = SeriesChartType.Bar; 174 if (!chart.Series.Any(x => x.ChartType != SeriesChartType.Bar && x.ChartType != SeriesChartType.StackedBar && x.ChartType != SeriesChartType.StackedBar100)) 175 series.ChartType = SeriesChartType.Bar; 176 else { 177 series.ChartType = SeriesChartType.FastPoint; //default 178 row.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Points; 179 } 175 180 break; 176 181 case DataRowVisualProperties.DataRowChartType.Columns: … … 179 184 case DataRowVisualProperties.DataRowChartType.Points: 180 185 series.ChartType = SeriesChartType.FastPoint; 181 series.BorderWidth = row.VisualProperties.LineWidth;182 series.BorderDashStyle = ConvertLineStyle(row.VisualProperties.LineStyle);183 186 break; 184 187 case DataRowVisualProperties.DataRowChartType.Histogram: -
branches/histogram/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesDialog.Designer.cs
r6014 r6016 51 51 this.splitContainer = new System.Windows.Forms.SplitContainer(); 52 52 this.seriesListView = new System.Windows.Forms.ListView(); 53 this.dataRowVisualPropertiesControl = new HeuristicLab.Analysis.Views.DataRowVisualPropertiesControl(); 53 54 this.chartTabPage = new System.Windows.Forms.TabPage(); 54 this.dataRowVisualPropertiesControl = new HeuristicLab.Analysis.Views.DataRowVisualPropertiesControl();55 55 this.dataTableVisualPropertiesControl = new HeuristicLab.Analysis.Views.DataTableVisualPropertiesControl(); 56 this.upButton = new System.Windows.Forms.Button(); 57 this.downButton = new System.Windows.Forms.Button(); 56 58 this.tabControl.SuspendLayout(); 57 59 this.seriesTabPage.SuspendLayout(); … … 120 122 // splitContainer.Panel1 121 123 // 124 this.splitContainer.Panel1.Controls.Add(this.downButton); 125 this.splitContainer.Panel1.Controls.Add(this.upButton); 122 126 this.splitContainer.Panel1.Controls.Add(this.seriesListView); 123 127 this.splitContainer.Panel1MinSize = 20; … … 133 137 // seriesListView 134 138 // 135 this.seriesListView.Dock = System.Windows.Forms.DockStyle.Fill; 139 this.seriesListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 140 | System.Windows.Forms.AnchorStyles.Left) 141 | System.Windows.Forms.AnchorStyles.Right))); 136 142 this.seriesListView.HideSelection = false; 137 this.seriesListView.Location = new System.Drawing.Point(0, 0);143 this.seriesListView.Location = new System.Drawing.Point(0, 28); 138 144 this.seriesListView.MultiSelect = false; 139 145 this.seriesListView.Name = "seriesListView"; 140 146 this.seriesListView.ShowGroups = false; 141 this.seriesListView.Size = new System.Drawing.Size(125, 318);147 this.seriesListView.Size = new System.Drawing.Size(125, 289); 142 148 this.seriesListView.TabIndex = 0; 143 149 this.seriesListView.UseCompatibleStateImageBehavior = false; 144 150 this.seriesListView.View = System.Windows.Forms.View.SmallIcon; 145 151 this.seriesListView.SelectedIndexChanged += new System.EventHandler(this.seriesListView_SelectedIndexChanged); 152 // 153 // dataRowVisualPropertiesControl 154 // 155 this.dataRowVisualPropertiesControl.Content = null; 156 this.dataRowVisualPropertiesControl.Dock = System.Windows.Forms.DockStyle.Fill; 157 this.dataRowVisualPropertiesControl.Location = new System.Drawing.Point(0, 0); 158 this.dataRowVisualPropertiesControl.Name = "dataRowVisualPropertiesControl"; 159 this.dataRowVisualPropertiesControl.Size = new System.Drawing.Size(331, 318); 160 this.dataRowVisualPropertiesControl.TabIndex = 0; 146 161 // 147 162 // chartTabPage … … 156 171 this.chartTabPage.UseVisualStyleBackColor = true; 157 172 // 158 // dataRowVisualPropertiesControl159 //160 this.dataRowVisualPropertiesControl.Content = null;161 this.dataRowVisualPropertiesControl.Dock = System.Windows.Forms.DockStyle.Fill;162 this.dataRowVisualPropertiesControl.Location = new System.Drawing.Point(0, 0);163 this.dataRowVisualPropertiesControl.Name = "dataRowVisualPropertiesControl";164 this.dataRowVisualPropertiesControl.Size = new System.Drawing.Size(331, 318);165 this.dataRowVisualPropertiesControl.TabIndex = 0;166 //167 173 // dataTableVisualPropertiesControl 168 174 // … … 173 179 this.dataTableVisualPropertiesControl.Size = new System.Drawing.Size(460, 318); 174 180 this.dataTableVisualPropertiesControl.TabIndex = 0; 181 // 182 // upButton 183 // 184 this.upButton.Location = new System.Drawing.Point(-1, 3); 185 this.upButton.Name = "upButton"; 186 this.upButton.Size = new System.Drawing.Size(26, 23); 187 this.upButton.TabIndex = 1; 188 this.upButton.Text = "Up"; 189 this.upButton.UseVisualStyleBackColor = true; 190 this.upButton.Click += new System.EventHandler(this.upButton_Click); 191 // 192 // downButton 193 // 194 this.downButton.Location = new System.Drawing.Point(27, 3); 195 this.downButton.Name = "downButton"; 196 this.downButton.Size = new System.Drawing.Size(26, 23); 197 this.downButton.TabIndex = 1; 198 this.downButton.Text = "Down"; 199 this.downButton.UseVisualStyleBackColor = true; 200 this.downButton.Click += new System.EventHandler(this.downButton_Click); 175 201 // 176 202 // DataTableVisualPropertiesDialog … … 208 234 private DataRowVisualPropertiesControl dataRowVisualPropertiesControl; 209 235 private DataTableVisualPropertiesControl dataTableVisualPropertiesControl; 236 private System.Windows.Forms.Button downButton; 237 private System.Windows.Forms.Button upButton; 210 238 } 211 239 } -
branches/histogram/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesDialog.cs
r6012 r6016 23 23 using System.Windows.Forms; 24 24 using HeuristicLab.Common.Resources; 25 using HeuristicLab.Core; 25 26 26 27 namespace HeuristicLab.Analysis.Views { … … 32 33 public DataTableVisualPropertiesDialog(DataTable dataTable) { 33 34 InitializeComponent(); 35 upButton.Text = string.Empty; 36 upButton.Image = VSImageLibrary.ArrowUp; 37 downButton.Text = string.Empty; 38 downButton.Image = VSImageLibrary.ArrowDown; 34 39 Content = dataTable; 35 40 originalDataTableVPs = (DataTableVisualProperties)Content.VisualProperties.Clone(); … … 71 76 Close(); 72 77 } 78 79 private void upButton_Click(object sender, System.EventArgs e) { 80 if (seriesListView.SelectedIndices.Count == 1 && seriesListView.SelectedIndices[0] > 0) { 81 int index = seriesListView.SelectedIndices[0]; 82 seriesListView.BeginUpdate(); 83 ListViewItem selectedSeriesItem = seriesListView.Items[index]; 84 seriesListView.Items.RemoveAt(index); 85 ListViewItem temp = seriesListView.Items[index - 1]; 86 seriesListView.Items.RemoveAt(index - 1); 87 seriesListView.Items.Insert(index - 1, selectedSeriesItem); 88 seriesListView.Items.Insert(index, temp); 89 seriesListView.EndUpdate(); 90 UpdateAllSeriesPositions(); 91 } 92 } 93 94 private void downButton_Click(object sender, System.EventArgs e) { 95 if (seriesListView.SelectedIndices.Count == 1 && seriesListView.SelectedIndices[0] < seriesListView.Items.Count - 1) { 96 int index = seriesListView.SelectedIndices[0]; 97 seriesListView.BeginUpdate(); 98 ListViewItem temp = seriesListView.Items[index + 1]; 99 seriesListView.Items.RemoveAt(index + 1); 100 ListViewItem selectedSeriesItem = seriesListView.Items[index]; 101 seriesListView.Items.RemoveAt(index); 102 seriesListView.Items.Insert(index, temp); 103 seriesListView.Items.Insert(index + 1, selectedSeriesItem); 104 seriesListView.EndUpdate(); 105 UpdateAllSeriesPositions(); 106 } 107 } 108 109 #region Helpers 110 private void UpdateAllSeriesPositions() { 111 NamedItemCollection<DataRow> rows = (NamedItemCollection<DataRow>)Content.Rows.Clone(); 112 Content.Rows.Clear(); 113 for (int i = 0; i < seriesListView.Items.Count; i++) { 114 ListViewItem item = seriesListView.Items[i]; 115 Content.Rows.Add(rows[item.Text]); 116 } 117 } 118 #endregion 73 119 } 74 120 }
Note: See TracChangeset
for help on using the changeset viewer.