Changeset 6610 for branches/QAPAlgorithms/HeuristicLab.Analysis.Views
- Timestamp:
- 07/29/11 11:23:06 (13 years ago)
- Location:
- branches/QAPAlgorithms/HeuristicLab.Analysis.Views/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/QAPAlgorithms/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.Designer.cs
r6342 r6610 73 73 this.lineStyleComboBox = new System.Windows.Forms.ComboBox(); 74 74 this.label8 = new System.Windows.Forms.Label(); 75 this.label9 = new System.Windows.Forms.Label(); 76 this.displayNameTextBox = new System.Windows.Forms.TextBox(); 75 77 ((System.ComponentModel.ISupportInitialize)(this.binsNumericUpDown)).BeginInit(); 76 78 this.commonGroupBox.SuspendLayout(); … … 88 90 this.chartTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 89 91 this.chartTypeComboBox.FormattingEnabled = true; 90 this.chartTypeComboBox.Location = new System.Drawing.Point( 76, 19);92 this.chartTypeComboBox.Location = new System.Drawing.Point(89, 45); 91 93 this.chartTypeComboBox.Name = "chartTypeComboBox"; 92 this.chartTypeComboBox.Size = new System.Drawing.Size(2 24, 21);94 this.chartTypeComboBox.Size = new System.Drawing.Size(211, 21); 93 95 this.chartTypeComboBox.TabIndex = 1; 94 96 this.chartTypeComboBox.SelectedValueChanged += new System.EventHandler(this.chartTypeComboBox_SelectedValueChanged); … … 101 103 // 102 104 this.colorButton.BackColor = System.Drawing.SystemColors.Control; 103 this.colorButton.Location = new System.Drawing.Point( 76, 46);105 this.colorButton.Location = new System.Drawing.Point(89, 72); 104 106 this.colorButton.Name = "colorButton"; 105 107 this.colorButton.Size = new System.Drawing.Size(23, 23); … … 140 142 // 141 143 this.label1.AutoSize = true; 142 this.label1.Location = new System.Drawing.Point(8, 22);144 this.label1.Location = new System.Drawing.Point(8, 48); 143 145 this.label1.Name = "label1"; 144 this.label1.Size = new System.Drawing.Size( 62, 13);146 this.label1.Size = new System.Drawing.Size(58, 13); 145 147 this.label1.TabIndex = 0; 146 this.label1.Text = "Chart Type:";148 this.label1.Text = "Chart type:"; 147 149 // 148 150 // label2 149 151 // 150 152 this.label2.AutoSize = true; 151 this.label2.Location = new System.Drawing.Point(8, 51);153 this.label2.Location = new System.Drawing.Point(8, 77); 152 154 this.label2.Name = "label2"; 153 155 this.label2.Size = new System.Drawing.Size(34, 13); … … 168 170 this.commonGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 169 171 | System.Windows.Forms.AnchorStyles.Right))); 172 this.commonGroupBox.Controls.Add(this.displayNameTextBox); 170 173 this.commonGroupBox.Controls.Add(this.axisGroupBox); 171 174 this.commonGroupBox.Controls.Add(this.colorButton); 175 this.commonGroupBox.Controls.Add(this.label9); 172 176 this.commonGroupBox.Controls.Add(this.label1); 173 177 this.commonGroupBox.Controls.Add(this.label2); … … 175 179 this.commonGroupBox.Location = new System.Drawing.Point(3, 3); 176 180 this.commonGroupBox.Name = "commonGroupBox"; 177 this.commonGroupBox.Size = new System.Drawing.Size(313, 1 58);181 this.commonGroupBox.Size = new System.Drawing.Size(313, 181); 178 182 this.commonGroupBox.TabIndex = 0; 179 183 this.commonGroupBox.TabStop = false; … … 186 190 this.axisGroupBox.Controls.Add(this.panel1); 187 191 this.axisGroupBox.Controls.Add(this.panel2); 188 this.axisGroupBox.Location = new System.Drawing.Point(6, 75);192 this.axisGroupBox.Location = new System.Drawing.Point(6, 101); 189 193 this.axisGroupBox.Name = "axisGroupBox"; 190 194 this.axisGroupBox.Size = new System.Drawing.Size(299, 75); 191 195 this.axisGroupBox.TabIndex = 9; 192 196 this.axisGroupBox.TabStop = false; 193 this.axisGroupBox.Text = "Display Data on";197 this.axisGroupBox.Text = "Display data on"; 194 198 // 195 199 // label5 … … 200 204 this.label5.Size = new System.Drawing.Size(39, 13); 201 205 this.label5.TabIndex = 6; 202 this.label5.Text = "Y 206 this.label5.Text = "Y-Axis:"; 203 207 // 204 208 // label6 … … 209 213 this.label6.Size = new System.Drawing.Size(39, 13); 210 214 this.label6.TabIndex = 6; 211 this.label6.Text = "X 215 this.label6.Text = "X-Axis:"; 212 216 // 213 217 // panel1 … … 284 288 this.histoGramGroupBox.Controls.Add(this.binsNumericUpDown); 285 289 this.histoGramGroupBox.Controls.Add(this.label3); 286 this.histoGramGroupBox.Location = new System.Drawing.Point(3, 2 69);290 this.histoGramGroupBox.Location = new System.Drawing.Point(3, 292); 287 291 this.histoGramGroupBox.Name = "histoGramGroupBox"; 288 292 this.histoGramGroupBox.Size = new System.Drawing.Size(313, 49); … … 334 338 this.lineChartGroupBox.Controls.Add(this.lineStyleComboBox); 335 339 this.lineChartGroupBox.Controls.Add(this.label8); 336 this.lineChartGroupBox.Location = new System.Drawing.Point(3, 1 67);340 this.lineChartGroupBox.Location = new System.Drawing.Point(3, 190); 337 341 this.lineChartGroupBox.Name = "lineChartGroupBox"; 338 342 this.lineChartGroupBox.Size = new System.Drawing.Size(313, 96); 339 343 this.lineChartGroupBox.TabIndex = 1; 340 344 this.lineChartGroupBox.TabStop = false; 341 this.lineChartGroupBox.Text = "Line Chart";345 this.lineChartGroupBox.Text = "Line chart"; 342 346 // 343 347 // lineWidthNumericUpDown … … 364 368 this.label4.Location = new System.Drawing.Point(8, 68); 365 369 this.label4.Name = "label4"; 366 this.label4.Size = new System.Drawing.Size( 61, 13);370 this.label4.Size = new System.Drawing.Size(58, 13); 367 371 this.label4.TabIndex = 4; 368 this.label4.Text = "Line Width:";372 this.label4.Text = "Line width:"; 369 373 // 370 374 // label7 … … 373 377 this.label7.Location = new System.Drawing.Point(8, 46); 374 378 this.label7.Name = "label7"; 375 this.label7.Size = new System.Drawing.Size(8 2, 13);379 this.label7.Size = new System.Drawing.Size(81, 13); 376 380 this.label7.TabIndex = 2; 377 this.label7.Text = "Start Index at 0:";381 this.label7.Text = "Start index at 0:"; 378 382 // 379 383 // lineStyleComboBox … … 392 396 this.label8.Location = new System.Drawing.Point(8, 22); 393 397 this.label8.Name = "label8"; 394 this.label8.Size = new System.Drawing.Size(5 6, 13);398 this.label8.Size = new System.Drawing.Size(54, 13); 395 399 this.label8.TabIndex = 0; 396 this.label8.Text = "Line Style:"; 400 this.label8.Text = "Line style:"; 401 // 402 // label9 403 // 404 this.label9.AutoSize = true; 405 this.label9.Location = new System.Drawing.Point(8, 22); 406 this.label9.Name = "label9"; 407 this.label9.Size = new System.Drawing.Size(75, 13); 408 this.label9.TabIndex = 0; 409 this.label9.Text = "Display Name:"; 410 // 411 // displayNameTextBox 412 // 413 this.displayNameTextBox.Location = new System.Drawing.Point(89, 19); 414 this.displayNameTextBox.Name = "displayNameTextBox"; 415 this.displayNameTextBox.Size = new System.Drawing.Size(211, 20); 416 this.displayNameTextBox.TabIndex = 10; 417 this.displayNameTextBox.Validated += new System.EventHandler(this.displayNameTextBox_Validated); 397 418 // 398 419 // DataRowVisualPropertiesControl … … 404 425 this.Controls.Add(this.commonGroupBox); 405 426 this.Name = "DataRowVisualPropertiesControl"; 406 this.Size = new System.Drawing.Size(319, 3 23);427 this.Size = new System.Drawing.Size(319, 347); 407 428 ((System.ComponentModel.ISupportInitialize)(this.binsNumericUpDown)).EndInit(); 408 429 this.commonGroupBox.ResumeLayout(false); … … 455 476 private System.Windows.Forms.Label label5; 456 477 private System.Windows.Forms.GroupBox axisGroupBox; 478 private System.Windows.Forms.TextBox displayNameTextBox; 479 private System.Windows.Forms.Label label9; 457 480 } 458 481 } -
branches/QAPAlgorithms/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs
r6342 r6610 64 64 binsApproximatelyRadioButton.Checked = false; 65 65 binsExactRadioButton.Checked = false; 66 displayNameTextBox.Text = String.Empty; 66 67 } else { 67 68 chartTypeComboBox.SelectedItem = Content.ChartType; … … 83 84 binsApproximatelyRadioButton.Checked = !Content.ExactBins; 84 85 binsExactRadioButton.Checked = Content.ExactBins; 86 displayNameTextBox.Text = Content.DisplayName; 85 87 } 86 88 } finally { SuppressEvents = false; } … … 168 170 } 169 171 } 172 173 private void displayNameTextBox_Validated(object sender, EventArgs e) { 174 if (!SuppressEvents && Content != null) { 175 SuppressEvents = true; 176 try { 177 Content.DisplayName = displayNameTextBox.Text; 178 } finally { SuppressEvents = false; } 179 } 180 } 170 181 #endregion 171 182 } -
branches/QAPAlgorithms/HeuristicLab.Analysis.Views/3.3/DataTableHistoryView.cs
r6342 r6610 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using System.Windows.Forms; 23 24 using HeuristicLab.Core.Views; … … 38 39 using (DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(current)) { 39 40 if (dialog.ShowDialog() != DialogResult.OK) return; 41 Dictionary<string, bool> changeDisplayName = new Dictionary<string, bool>(); 42 foreach (DataRow row in current.Rows) { 43 var answer = MessageBox.Show("Change display name for series " + row.Name + " to " + row.VisualProperties.DisplayName + " for all frames?", "Confirm change", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); 44 if (answer == DialogResult.Cancel) return; 45 changeDisplayName[row.Name] = (answer == DialogResult.Yes); 46 } 40 47 foreach (DataTable dt in Content) { 41 if (current != dt) { 42 dt.VisualProperties = (DataTableVisualProperties)current.VisualProperties.Clone(); 43 foreach (DataRow row in current.Rows) 44 dt.Rows[row.Name].VisualProperties = (DataRowVisualProperties)row.VisualProperties.Clone(); 48 if (current == dt) continue; 49 dt.VisualProperties = (DataTableVisualProperties)current.VisualProperties.Clone(); 50 foreach (DataRow row in current.Rows) { 51 if (!dt.Rows.ContainsKey(row.Name)) continue; 52 string oldDisplayName = dt.Rows[row.Name].VisualProperties.DisplayName; 53 var props = (DataRowVisualProperties)row.VisualProperties.Clone(); 54 if (!changeDisplayName[row.Name]) props.DisplayName = oldDisplayName; 55 dt.Rows[row.Name].VisualProperties = props; 45 56 } 46 57 } -
branches/QAPAlgorithms/HeuristicLab.Analysis.Views/3.3/DataTableView.cs
r6342 r6610 159 159 protected virtual void AddDataRow(DataRow row) { 160 160 Series series = new Series(row.Name); 161 if (row.VisualProperties.DisplayName.Trim() != String.Empty) series.LegendText = row.VisualProperties.DisplayName; 162 else series.LegendText = row.Name; 161 163 ConfigureSeries(series, row); 162 164 FillSeriesWithRowValues(series, row); … … 212 214 series.YAxisType = row.VisualProperties.SecondYAxis ? AxisType.Secondary : AxisType.Primary; 213 215 series.XAxisType = row.VisualProperties.SecondXAxis ? AxisType.Secondary : AxisType.Primary; 214 series.ToolTip = row.Name + " X = #INDEX, Y = #VAL"; 216 if (row.VisualProperties.DisplayName.Trim() != String.Empty) series.LegendText = row.VisualProperties.DisplayName; 217 else series.LegendText = row.Name; 218 series.ToolTip = series.LegendText + " X = #INDEX, Y = #VAL"; 215 219 } 216 220 -
branches/QAPAlgorithms/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesDialog.Designer.cs
r6342 r6610 69 69 this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 70 70 this.okButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 71 this.okButton.Location = new System.Drawing.Point(307, 3 57);71 this.okButton.Location = new System.Drawing.Point(307, 381); 72 72 this.okButton.Name = "okButton"; 73 73 this.okButton.Size = new System.Drawing.Size(75, 23); … … 81 81 this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 82 82 this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 83 this.cancelButton.Location = new System.Drawing.Point(388, 3 57);83 this.cancelButton.Location = new System.Drawing.Point(388, 381); 84 84 this.cancelButton.Name = "cancelButton"; 85 85 this.cancelButton.Size = new System.Drawing.Size(75, 23); … … 99 99 this.tabControl.Name = "tabControl"; 100 100 this.tabControl.SelectedIndex = 0; 101 this.tabControl.Size = new System.Drawing.Size(474, 3 50);101 this.tabControl.Size = new System.Drawing.Size(474, 374); 102 102 this.tabControl.TabIndex = 2; 103 103 // … … 108 108 this.seriesTabPage.Name = "seriesTabPage"; 109 109 this.seriesTabPage.Padding = new System.Windows.Forms.Padding(3); 110 this.seriesTabPage.Size = new System.Drawing.Size(466, 3 24);110 this.seriesTabPage.Size = new System.Drawing.Size(466, 348); 111 111 this.seriesTabPage.TabIndex = 0; 112 112 this.seriesTabPage.Text = "Series"; … … 131 131 this.splitContainer.Panel2.Controls.Add(this.dataRowVisualPropertiesControl); 132 132 this.splitContainer.Panel2MinSize = 50; 133 this.splitContainer.Size = new System.Drawing.Size(460, 3 18);133 this.splitContainer.Size = new System.Drawing.Size(460, 342); 134 134 this.splitContainer.SplitterDistance = 125; 135 135 this.splitContainer.TabIndex = 0; … … 165 165 this.seriesListView.Name = "seriesListView"; 166 166 this.seriesListView.ShowGroups = false; 167 this.seriesListView.Size = new System.Drawing.Size(125, 289);167 this.seriesListView.Size = new System.Drawing.Size(125, 313); 168 168 this.seriesListView.TabIndex = 0; 169 169 this.seriesListView.UseCompatibleStateImageBehavior = false; … … 177 177 this.dataRowVisualPropertiesControl.Location = new System.Drawing.Point(0, 0); 178 178 this.dataRowVisualPropertiesControl.Name = "dataRowVisualPropertiesControl"; 179 this.dataRowVisualPropertiesControl.Size = new System.Drawing.Size(331, 3 18);179 this.dataRowVisualPropertiesControl.Size = new System.Drawing.Size(331, 342); 180 180 this.dataRowVisualPropertiesControl.TabIndex = 0; 181 181 // … … 206 206 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 207 207 this.CancelButton = this.cancelButton; 208 this.ClientSize = new System.Drawing.Size(475, 392);208 this.ClientSize = new System.Drawing.Size(475, 416); 209 209 this.Controls.Add(this.tabControl); 210 210 this.Controls.Add(this.cancelButton);
Note: See TracChangeset
for help on using the changeset viewer.