- Timestamp:
- 12/20/11 17:07:01 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.