- Timestamp:
- 12/20/11 17:07:01 (13 years ago)
- Location:
- trunk/sources
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.Designer.cs
r6628 r7216 54 54 this.label3 = new System.Windows.Forms.Label(); 55 55 this.commonGroupBox = new System.Windows.Forms.GroupBox(); 56 this.displayNameTextBox = new System.Windows.Forms.TextBox(); 56 57 this.axisGroupBox = new System.Windows.Forms.GroupBox(); 57 58 this.label5 = new System.Windows.Forms.Label(); … … 63 64 this.xAxisPrimaryRadioButton = new System.Windows.Forms.RadioButton(); 64 65 this.xAxisSecondaryRadioButton = new System.Windows.Forms.RadioButton(); 66 this.label9 = new System.Windows.Forms.Label(); 65 67 this.histoGramGroupBox = new System.Windows.Forms.GroupBox(); 66 68 this.panel3 = new System.Windows.Forms.Panel(); … … 73 75 this.lineStyleComboBox = new System.Windows.Forms.ComboBox(); 74 76 this.label8 = new System.Windows.Forms.Label(); 75 this.label9 = new System.Windows.Forms.Label();76 this.displayNameTextBox = new System.Windows.Forms.TextBox();77 77 ((System.ComponentModel.ISupportInitialize)(this.binsNumericUpDown)).BeginInit(); 78 78 this.commonGroupBox.SuspendLayout(); … … 168 168 // commonGroupBox 169 169 // 170 this.commonGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 171 | System.Windows.Forms.AnchorStyles.Right))); 170 this.commonGroupBox.Anchor = System.Windows.Forms.AnchorStyles.Top; 172 171 this.commonGroupBox.Controls.Add(this.displayNameTextBox); 173 172 this.commonGroupBox.Controls.Add(this.axisGroupBox); … … 184 183 this.commonGroupBox.Text = "Common"; 185 184 // 185 // displayNameTextBox 186 // 187 this.displayNameTextBox.Location = new System.Drawing.Point(89, 19); 188 this.displayNameTextBox.Name = "displayNameTextBox"; 189 this.displayNameTextBox.Size = new System.Drawing.Size(211, 20); 190 this.displayNameTextBox.TabIndex = 10; 191 this.displayNameTextBox.Validated += new System.EventHandler(this.displayNameTextBox_Validated); 192 // 186 193 // axisGroupBox 187 194 // … … 281 288 this.xAxisSecondaryRadioButton.CheckedChanged += new System.EventHandler(this.xAxisRadioButton_CheckedChanged); 282 289 // 290 // label9 291 // 292 this.label9.AutoSize = true; 293 this.label9.Location = new System.Drawing.Point(8, 22); 294 this.label9.Name = "label9"; 295 this.label9.Size = new System.Drawing.Size(75, 13); 296 this.label9.TabIndex = 0; 297 this.label9.Text = "Display Name:"; 298 // 283 299 // histoGramGroupBox 284 300 // 285 this.histoGramGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 286 | System.Windows.Forms.AnchorStyles.Right))); 301 this.histoGramGroupBox.Anchor = System.Windows.Forms.AnchorStyles.Top; 287 302 this.histoGramGroupBox.Controls.Add(this.panel3); 288 303 this.histoGramGroupBox.Controls.Add(this.binsNumericUpDown); … … 330 345 // lineChartGroupBox 331 346 // 332 this.lineChartGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 333 | System.Windows.Forms.AnchorStyles.Right))); 347 this.lineChartGroupBox.Anchor = System.Windows.Forms.AnchorStyles.Top; 334 348 this.lineChartGroupBox.Controls.Add(this.lineWidthNumericUpDown); 335 349 this.lineChartGroupBox.Controls.Add(this.label4); … … 399 413 this.label8.TabIndex = 0; 400 414 this.label8.Text = "Line style:"; 401 //402 // label9403 //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 // displayNameTextBox412 //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);418 415 // 419 416 // DataRowVisualPropertiesControl -
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableHistoryView.cs
r6628 r7216 20 20 #endregion 21 21 22 using System. Collections.Generic;22 using System.Linq; 23 23 using System.Windows.Forms; 24 24 using HeuristicLab.Core.Views; 25 25 using HeuristicLab.MainForm; 26 using System.Collections.Generic; 26 27 27 28 namespace HeuristicLab.Analysis.Views { … … 39 40 using (DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(current)) { 40 41 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 } 42 HashSet<string> modifiedDisplayNames = new HashSet<string>(dialog.RowsWithModifiedDisplayNames); 47 43 foreach (DataTable dt in Content) { 48 44 if (current == dt) continue; … … 51 47 if (!dt.Rows.ContainsKey(row.Name)) continue; 52 48 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;49 dt.Rows[row.Name].VisualProperties = (DataRowVisualProperties)row.VisualProperties.Clone(); 50 if (!modifiedDisplayNames.Contains(row.Name)) 51 dt.Rows[row.Name].VisualProperties.DisplayName = oldDisplayName; 56 52 } 57 53 } -
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesDialog.Designer.cs
r6628 r7216 68 68 // 69 69 this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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, 381);70 this.okButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 71 this.okButton.Location = new System.Drawing.Point(297, 386); 72 72 this.okButton.Name = "okButton"; 73 73 this.okButton.Size = new System.Drawing.Size(75, 23); 74 74 this.okButton.TabIndex = 0; 75 this.okButton.Text = "O k";75 this.okButton.Text = "OK"; 76 76 this.okButton.UseVisualStyleBackColor = true; 77 77 this.okButton.Click += new System.EventHandler(this.okButton_Click); … … 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(3 88, 381);83 this.cancelButton.Location = new System.Drawing.Point(378, 386); 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(4 74, 374);101 this.tabControl.Size = new System.Drawing.Size(464, 379); 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(4 66, 348);110 this.seriesTabPage.Size = new System.Drawing.Size(456, 353); 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(4 60, 342);133 this.splitContainer.Size = new System.Drawing.Size(450, 347); 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, 31 3);167 this.seriesListView.Size = new System.Drawing.Size(125, 319); 168 168 this.seriesListView.TabIndex = 0; 169 169 this.seriesListView.UseCompatibleStateImageBehavior = false; … … 174 174 // 175 175 this.dataRowVisualPropertiesControl.Content = null; 176 this.dataRowVisualPropertiesControl.Dock = System.Windows.Forms.DockStyle.Fill; 177 this.dataRowVisualPropertiesControl.Location = new System.Drawing.Point(0, 0); 176 this.dataRowVisualPropertiesControl.Location = new System.Drawing.Point(3, 3); 178 177 this.dataRowVisualPropertiesControl.Name = "dataRowVisualPropertiesControl"; 179 this.dataRowVisualPropertiesControl.Size = new System.Drawing.Size(3 31, 342);178 this.dataRowVisualPropertiesControl.Size = new System.Drawing.Size(318, 342); 180 179 this.dataRowVisualPropertiesControl.TabIndex = 0; 181 180 // … … 186 185 this.chartTabPage.Name = "chartTabPage"; 187 186 this.chartTabPage.Padding = new System.Windows.Forms.Padding(3); 188 this.chartTabPage.Size = new System.Drawing.Size(4 66, 324);187 this.chartTabPage.Size = new System.Drawing.Size(453, 348); 189 188 this.chartTabPage.TabIndex = 1; 190 189 this.chartTabPage.Text = "Chart"; … … 197 196 this.dataTableVisualPropertiesControl.Location = new System.Drawing.Point(3, 3); 198 197 this.dataTableVisualPropertiesControl.Name = "dataTableVisualPropertiesControl"; 199 this.dataTableVisualPropertiesControl.Size = new System.Drawing.Size(4 60, 318);198 this.dataTableVisualPropertiesControl.Size = new System.Drawing.Size(447, 342); 200 199 this.dataTableVisualPropertiesControl.TabIndex = 0; 201 200 // … … 206 205 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 207 206 this.CancelButton = this.cancelButton; 208 this.ClientSize = new System.Drawing.Size(4 75, 416);207 this.ClientSize = new System.Drawing.Size(465, 421); 209 208 this.Controls.Add(this.tabControl); 210 209 this.Controls.Add(this.cancelButton); -
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesDialog.cs
r6342 r7216 21 21 22 22 using System.Collections.Generic; 23 using System.ComponentModel; 23 24 using System.Linq; 24 25 using System.Windows.Forms; … … 32 33 private Dictionary<string, DataRowVisualProperties> originalDataRowVPs; 33 34 35 private HashSet<string> modifiedDisplayNames; 36 public IEnumerable<string> RowsWithModifiedDisplayNames { get { return modifiedDisplayNames.AsEnumerable(); } } 37 34 38 public DataTableVisualPropertiesDialog(DataTable dataTable) { 35 39 InitializeComponent(); 40 #region Prepare controls 36 41 upButton.Text = string.Empty; 37 42 upButton.Image = VSImageLibrary.ArrowUp; 38 43 downButton.Text = string.Empty; 39 44 downButton.Image = VSImageLibrary.ArrowDown; 45 seriesListView.Items.Clear(); 46 seriesListView.SmallImageList = new ImageList(); 47 seriesListView.SmallImageList.Images.Add(VSImageLibrary.Graph); 48 #endregion 49 40 50 Content = dataTable; 41 51 originalDataTableVPs = (DataTableVisualProperties)Content.VisualProperties.Clone(); … … 43 53 foreach (DataRow row in Content.Rows) 44 54 originalDataRowVPs.Add(row.Name, (DataRowVisualProperties)row.VisualProperties.Clone()); 45 seriesListView.Items.Clear(); 46 seriesListView.SmallImageList = new ImageList(); 47 seriesListView.SmallImageList.Images.Add(VSImageLibrary.Graph); 55 56 dataTableVisualPropertiesControl.Content = Content.VisualProperties; 57 58 modifiedDisplayNames = new HashSet<string>(); 48 59 FillSeriesListView(); 49 dataTableVisualPropertiesControl.Content = Content.VisualProperties;60 RegisterContentEvents(); 50 61 } 51 62 52 private void FillSeriesListView() { 53 seriesListView.SelectedIndices.Clear(); 63 private void RegisterContentEvents() { 54 64 foreach (DataRow row in Content.Rows) { 55 seriesListView.Items.Add(new ListViewItem(row.Name, 0));65 row.VisualProperties.PropertyChanged += new PropertyChangedEventHandler(Row_VisualProperties_PropertyChanged); 56 66 } 57 seriesListView.SelectedIndices.Add(0); 67 } 68 69 private void DeregisterContentEvents() { 70 foreach (DataRow row in Content.Rows) { 71 row.VisualProperties.PropertyChanged -= new PropertyChangedEventHandler(Row_VisualProperties_PropertyChanged); 72 } 73 } 74 75 protected override void OnClosing(CancelEventArgs e) { 76 DeregisterContentEvents(); 77 Application.DoEvents(); 78 base.OnClosing(e); 79 } 80 81 private void Row_VisualProperties_PropertyChanged(object sender, PropertyChangedEventArgs e) { 82 foreach (DataRow row in Content.Rows) { 83 if (e.PropertyName == "DisplayName" && row.VisualProperties == sender) { 84 modifiedDisplayNames.Add(row.Name); 85 break; 86 } 87 } 58 88 } 59 89 … … 79 109 row.VisualProperties = originalDataRowVPs[row.Name]; 80 110 } 111 modifiedDisplayNames.Clear(); 81 112 Content.VisualProperties = originalDataTableVPs; 82 113 Close(); … … 124 155 125 156 #region Helpers 157 private void FillSeriesListView() { 158 seriesListView.SelectedIndices.Clear(); 159 foreach (DataRow row in Content.Rows) { 160 seriesListView.Items.Add(new ListViewItem(row.Name, 0)); 161 } 162 seriesListView.SelectedIndices.Add(0); 163 } 164 126 165 private void UpdateAllSeriesPositions() { 127 166 Dictionary<string, DataRow> rows = Content.Rows.ToDictionary(x => x.Name); -
trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/ImageExportDialog.Designer.cs
r6641 r7216 67 67 this.previewZoomLabel = new System.Windows.Forms.Label(); 68 68 this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); 69 this.label19 = new System.Windows.Forms.Label(); 70 this.rawImageSizeLabel = new System.Windows.Forms.Label(); 69 71 ((System.ComponentModel.ISupportInitialize)(this.widthNumericUD)).BeginInit(); 70 72 this.groupBox1.SuspendLayout(); … … 162 164 "96", 163 165 "150", 164 "300", 165 "600"}); 166 "300"}); 166 167 this.resolutionComboBox.Location = new System.Drawing.Point(76, 383); 167 168 this.resolutionComboBox.Name = "resolutionComboBox"; … … 180 181 65536}); 181 182 this.widthNumericUD.Location = new System.Drawing.Point(76, 410); 182 this.widthNumericUD.Maximum = new decimal(new int[] {183 1000,184 0,185 0,186 0});187 183 this.widthNumericUD.Minimum = new decimal(new int[] { 188 184 1, 189 185 0, 190 186 0, 191 131072});187 65536}); 192 188 this.widthNumericUD.Name = "widthNumericUD"; 193 189 this.widthNumericUD.Size = new System.Drawing.Size(75, 20); … … 499 495 65536}); 500 496 this.heightNumericUD.Location = new System.Drawing.Point(76, 436); 501 this.heightNumericUD.Maximum = new decimal(new int[] {502 1000,503 0,504 0,505 0});506 497 this.heightNumericUD.Minimum = new decimal(new int[] { 507 498 1, 508 499 0, 509 500 0, 510 131072});501 65536}); 511 502 this.heightNumericUD.Name = "heightNumericUD"; 512 503 this.heightNumericUD.Size = new System.Drawing.Size(75, 20); … … 548 539 // 549 540 this.splitContainer.Panel2.Controls.Add(this.previewPictureBox); 541 this.splitContainer.Panel2.Controls.Add(this.label19); 550 542 this.splitContainer.Panel2.Controls.Add(this.label13); 543 this.splitContainer.Panel2.Controls.Add(this.rawImageSizeLabel); 551 544 this.splitContainer.Panel2.Controls.Add(this.previewZoomLabel); 552 545 this.splitContainer.Size = new System.Drawing.Size(793, 478); … … 640 633 "*.gif)|*.gif|TIFF (*.tif)|*.tif\""; 641 634 this.saveFileDialog.FilterIndex = 2; 635 // 636 // label19 637 // 638 this.label19.AutoSize = true; 639 this.label19.Location = new System.Drawing.Point(85, 459); 640 this.label19.Name = "label19"; 641 this.label19.Size = new System.Drawing.Size(84, 13); 642 this.label19.TabIndex = 10; 643 this.label19.Text = "Raw image size:"; 644 // 645 // rawImageSizeLabel 646 // 647 this.rawImageSizeLabel.AutoSize = true; 648 this.rawImageSizeLabel.Location = new System.Drawing.Point(175, 459); 649 this.rawImageSizeLabel.Name = "rawImageSizeLabel"; 650 this.rawImageSizeLabel.Size = new System.Drawing.Size(37, 13); 651 this.rawImageSizeLabel.TabIndex = 10; 652 this.rawImageSizeLabel.Text = "0.00M"; 642 653 // 643 654 // ImageExportDialog … … 721 732 private System.Windows.Forms.ComboBox legendFontSizeComboBox; 722 733 private System.Windows.Forms.Label label17; 734 private System.Windows.Forms.Label label19; 735 private System.Windows.Forms.Label rawImageSizeLabel; 723 736 } 724 737 } -
trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/ImageExportDialog.cs
r6644 r7216 127 127 previewHeight = (int)Math.Round(height); 128 128 } else previewZoomLabel.Text = (scaleFactor * 100).ToString("0") + "%"; 129 rawImageSizeLabel.Text = GetRawImageSizeInMegabytes(width, height).ToString("0.00") + "M " + "(" + Math.Round(width).ToString("0") + " x " + Math.Round(height).ToString("0") + ") pixels"; 129 130 130 131 Bitmap image = new Bitmap(previewWidth, previewHeight); … … 238 239 239 240 private void widthNumericUD_ValueChanged(object sender, EventArgs e) { 241 float dpi, width, height; 242 GetImageParameters(out dpi, out width, out height); 243 if (GetRawImageSizeInMegabytes(width, height) > 25) // bigger than A4 at 300dpi 244 MessageBox.Show("Warning: The image is getting quite big."); 240 245 if (togglePreviewCheckBox.Checked) UpdatePreview(); 241 246 } 242 247 243 248 private void heightNumericUD_ValueChanged(object sender, EventArgs e) { 249 float dpi, width, height; 250 GetImageParameters(out dpi, out width, out height); 251 if (GetRawImageSizeInMegabytes(width, height) > 25) // bigger than A4 at 300dpi 252 MessageBox.Show("Warning: The image is getting quite big."); 244 253 if (togglePreviewCheckBox.Checked) UpdatePreview(); 245 254 } … … 376 385 } 377 386 387 private static float GetRawImageSizeInMegabytes(float width, float height) { 388 return ((3 * width * height) / (1024 * 1024)); 389 } 390 378 391 } 379 392 }
Note: See TracChangeset
for help on using the changeset viewer.