Changeset 9520
- Timestamp:
- 05/23/13 22:24:47 (12 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
r9496 r9520 84 84 this.heightNumericUD = new System.Windows.Forms.NumericUpDown(); 85 85 this.splitContainer = new System.Windows.Forms.SplitContainer(); 86 this.legendGroupBox = new System.Windows.Forms.GroupBox(); 87 this.label20 = new System.Windows.Forms.Label(); 88 this.legendPositionComboBox = new System.Windows.Forms.ComboBox(); 86 89 this.chartAreaComboBox = new System.Windows.Forms.ComboBox(); 87 90 this.togglePreviewCheckBox = new System.Windows.Forms.CheckBox(); … … 105 108 this.splitContainer.Panel2.SuspendLayout(); 106 109 this.splitContainer.SuspendLayout(); 110 this.legendGroupBox.SuspendLayout(); 107 111 ((System.ComponentModel.ISupportInitialize)(this.previewPictureBox)).BeginInit(); 108 112 this.SuspendLayout(); … … 130 134 this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; 131 135 this.okButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 132 this.okButton.Location = new System.Drawing.Point(141, 487);136 this.okButton.Location = new System.Drawing.Point(141, 552); 133 137 this.okButton.Name = "okButton"; 134 138 this.okButton.Size = new System.Drawing.Size(75, 23); … … 198 202 "800", 199 203 "1200"}); 200 this.resolutionComboBox.Location = new System.Drawing.Point(84, 383);204 this.resolutionComboBox.Location = new System.Drawing.Point(84, 450); 201 205 this.resolutionComboBox.Name = "resolutionComboBox"; 202 206 this.resolutionComboBox.Size = new System.Drawing.Size(83, 21); … … 215 219 0, 216 220 65536}); 217 this.widthNumericUD.Location = new System.Drawing.Point(84, 4 10);221 this.widthNumericUD.Location = new System.Drawing.Point(84, 477); 218 222 this.widthNumericUD.Minimum = new decimal(new int[] { 219 223 1, … … 234 238 // 235 239 this.label5.AutoSize = true; 236 this.label5.Location = new System.Drawing.Point(18, 386);240 this.label5.Location = new System.Drawing.Point(18, 453); 237 241 this.label5.Name = "label5"; 238 242 this.label5.Size = new System.Drawing.Size(60, 13); … … 243 247 // 244 248 this.label6.AutoSize = true; 245 this.label6.Location = new System.Drawing.Point(18, 4 12);249 this.label6.Location = new System.Drawing.Point(18, 479); 246 250 this.label6.Name = "label6"; 247 251 this.label6.Size = new System.Drawing.Size(38, 13); … … 306 310 // 307 311 this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 308 this.cancelButton.Location = new System.Drawing.Point(222, 487);312 this.cancelButton.Location = new System.Drawing.Point(222, 552); 309 313 this.cancelButton.Name = "cancelButton"; 310 314 this.cancelButton.Size = new System.Drawing.Size(75, 23); … … 340 344 this.groupBox1.Controls.Add(this.label4); 341 345 this.groupBox1.Controls.Add(this.label3); 342 this.groupBox1.Location = new System.Drawing.Point(12, 154);346 this.groupBox1.Location = new System.Drawing.Point(12, 221); 343 347 this.groupBox1.Name = "groupBox1"; 344 348 this.groupBox1.Size = new System.Drawing.Size(258, 82); … … 377 381 this.groupBox2.Controls.Add(this.label14); 378 382 this.groupBox2.Controls.Add(this.label15); 379 this.groupBox2.Location = new System.Drawing.Point(12, 64);383 this.groupBox2.Location = new System.Drawing.Point(12, 131); 380 384 this.groupBox2.Name = "groupBox2"; 381 385 this.groupBox2.Size = new System.Drawing.Size(258, 84); … … 460 464 this.groupBox3.Controls.Add(this.axisFontSizeComboBox); 461 465 this.groupBox3.Controls.Add(this.titleFontSizeComboBox); 462 this.groupBox3.Location = new System.Drawing.Point(12, 242);466 this.groupBox3.Location = new System.Drawing.Point(12, 309); 463 467 this.groupBox3.Name = "groupBox3"; 464 468 this.groupBox3.Size = new System.Drawing.Size(258, 131); … … 569 573 // 570 574 this.label16.AutoSize = true; 571 this.label16.Location = new System.Drawing.Point(18, 438);575 this.label16.Location = new System.Drawing.Point(18, 505); 572 576 this.label16.Name = "label16"; 573 577 this.label16.Size = new System.Drawing.Size(41, 13); … … 583 587 0, 584 588 65536}); 585 this.heightNumericUD.Location = new System.Drawing.Point(84, 436);589 this.heightNumericUD.Location = new System.Drawing.Point(84, 503); 586 590 this.heightNumericUD.Minimum = new decimal(new int[] { 587 591 1, … … 608 612 // splitContainer.Panel1 609 613 // 614 this.splitContainer.Panel1.Controls.Add(this.legendGroupBox); 610 615 this.splitContainer.Panel1.Controls.Add(this.chartAreaComboBox); 611 616 this.splitContainer.Panel1.Controls.Add(this.togglePreviewCheckBox); … … 632 637 this.splitContainer.Panel2.Controls.Add(this.rawImageSizeLabel); 633 638 this.splitContainer.Panel2.Controls.Add(this.previewZoomLabel); 634 this.splitContainer.Size = new System.Drawing.Size(793, 478);639 this.splitContainer.Size = new System.Drawing.Size(793, 542); 635 640 this.splitContainer.SplitterDistance = 300; 636 641 this.splitContainer.SplitterWidth = 1; 637 642 this.splitContainer.TabIndex = 1; 643 // 644 // legendGroupBox 645 // 646 this.legendGroupBox.Controls.Add(this.label20); 647 this.legendGroupBox.Controls.Add(this.legendPositionComboBox); 648 this.legendGroupBox.Location = new System.Drawing.Point(12, 64); 649 this.legendGroupBox.Name = "legendGroupBox"; 650 this.legendGroupBox.Size = new System.Drawing.Size(258, 61); 651 this.legendGroupBox.TabIndex = 17; 652 this.legendGroupBox.TabStop = false; 653 this.legendGroupBox.Text = "Legend"; 654 // 655 // label20 656 // 657 this.label20.AutoSize = true; 658 this.label20.Location = new System.Drawing.Point(6, 27); 659 this.label20.Name = "label20"; 660 this.label20.Size = new System.Drawing.Size(47, 13); 661 this.label20.TabIndex = 0; 662 this.label20.Text = "Position:"; 663 // 664 // legendPositionComboBox 665 // 666 this.legendPositionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 667 this.legendPositionComboBox.FormattingEnabled = true; 668 this.legendPositionComboBox.Items.AddRange(new object[] { 669 "Top", 670 "Right", 671 "Bottom", 672 "Left", 673 "Hidden"}); 674 this.legendPositionComboBox.Location = new System.Drawing.Point(72, 24); 675 this.legendPositionComboBox.Name = "legendPositionComboBox"; 676 this.legendPositionComboBox.Size = new System.Drawing.Size(159, 21); 677 this.legendPositionComboBox.TabIndex = 3; 678 this.legendPositionComboBox.SelectedIndexChanged += new System.EventHandler(this.legendPositionComboBox_SelectedIndexChanged); 638 679 // 639 680 // chartAreaComboBox … … 656 697 this.togglePreviewCheckBox.Location = new System.Drawing.Point(277, 3); 657 698 this.togglePreviewCheckBox.Name = "togglePreviewCheckBox"; 658 this.togglePreviewCheckBox.Size = new System.Drawing.Size(20, 472);699 this.togglePreviewCheckBox.Size = new System.Drawing.Size(20, 536); 659 700 this.togglePreviewCheckBox.TabIndex = 16; 660 701 this.togglePreviewCheckBox.Text = ">"; … … 667 708 this.lengthUnitComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 668 709 this.lengthUnitComboBox.FormattingEnabled = true; 669 this.lengthUnitComboBox.Location = new System.Drawing.Point(173, 4 22);710 this.lengthUnitComboBox.Location = new System.Drawing.Point(173, 489); 670 711 this.lengthUnitComboBox.Name = "lengthUnitComboBox"; 671 712 this.lengthUnitComboBox.Size = new System.Drawing.Size(70, 21); … … 677 718 this.resolutionUnitComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 678 719 this.resolutionUnitComboBox.FormattingEnabled = true; 679 this.resolutionUnitComboBox.Location = new System.Drawing.Point(173, 383);720 this.resolutionUnitComboBox.Location = new System.Drawing.Point(173, 450); 680 721 this.resolutionUnitComboBox.Name = "resolutionUnitComboBox"; 681 722 this.resolutionUnitComboBox.Size = new System.Drawing.Size(70, 21); … … 696 737 this.previewPictureBox.Location = new System.Drawing.Point(0, 3); 697 738 this.previewPictureBox.Name = "previewPictureBox"; 698 this.previewPictureBox.Size = new System.Drawing.Size(492, 453);739 this.previewPictureBox.Size = new System.Drawing.Size(492, 520); 699 740 this.previewPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; 700 741 this.previewPictureBox.TabIndex = 0; … … 704 745 // 705 746 this.label19.AutoSize = true; 706 this.label19.Location = new System.Drawing.Point(8 5, 459);747 this.label19.Location = new System.Drawing.Point(84, 526); 707 748 this.label19.Name = "label19"; 708 749 this.label19.Size = new System.Drawing.Size(84, 13); … … 713 754 // 714 755 this.label13.AutoSize = true; 715 this.label13.Location = new System.Drawing.Point( 3, 459);756 this.label13.Location = new System.Drawing.Point(2, 526); 716 757 this.label13.Name = "label13"; 717 758 this.label13.Size = new System.Drawing.Size(37, 13); … … 722 763 // 723 764 this.rawImageSizeLabel.AutoSize = true; 724 this.rawImageSizeLabel.Location = new System.Drawing.Point(17 5, 459);765 this.rawImageSizeLabel.Location = new System.Drawing.Point(174, 526); 725 766 this.rawImageSizeLabel.Name = "rawImageSizeLabel"; 726 767 this.rawImageSizeLabel.Size = new System.Drawing.Size(37, 13); … … 731 772 // 732 773 this.previewZoomLabel.AutoSize = true; 733 this.previewZoomLabel.Location = new System.Drawing.Point(4 6, 459);774 this.previewZoomLabel.Location = new System.Drawing.Point(45, 526); 734 775 this.previewZoomLabel.Name = "previewZoomLabel"; 735 776 this.previewZoomLabel.Size = new System.Drawing.Size(33, 13); … … 748 789 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 749 790 this.CancelButton = this.cancelButton; 750 this.ClientSize = new System.Drawing.Size(794, 5 22);791 this.ClientSize = new System.Drawing.Size(794, 587); 751 792 this.ControlBox = false; 752 793 this.Controls.Add(this.splitContainer); … … 772 813 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); 773 814 this.splitContainer.ResumeLayout(false); 815 this.legendGroupBox.ResumeLayout(false); 816 this.legendGroupBox.PerformLayout(); 774 817 ((System.ComponentModel.ISupportInitialize)(this.previewPictureBox)).EndInit(); 775 818 this.ResumeLayout(false); … … 829 872 private System.Windows.Forms.CheckBox showPrimaryXAxisCheckBox; 830 873 private System.Windows.Forms.ToolTip toolTip; 874 private System.Windows.Forms.GroupBox legendGroupBox; 875 private System.Windows.Forms.Label label20; 876 private System.Windows.Forms.ComboBox legendPositionComboBox; 831 877 } 832 878 } -
trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/ImageExportDialog.cs
r9496 r9520 67 67 splitContainer.Panel2Collapsed = true; 68 68 Width = 305; 69 Height = 560;69 Height = 625; 70 70 } finally { SuppressEvents = false; } 71 71 #endregion … … 156 156 originalChart.Serializer.Content = SerializationContents.Default; 157 157 originalChart.Serializer.Format = SerializationFormat.Binary; 158 var ms = new MemoryStream(); 159 originalChart.Serializer.Save(ms); 160 161 ms.Seek(0, SeekOrigin.Begin); 162 workingChart = new EnhancedChart(); 163 workingChart.Serializer.Format = originalChart.Serializer.Format; 164 workingChart.Serializer.Load(ms); 165 ms.Close(); 158 using (var ms = new MemoryStream()) { 159 originalChart.Serializer.Save(ms); 160 161 ms.Seek(0, SeekOrigin.Begin); 162 workingChart = new EnhancedChart(); 163 workingChart.Serializer.Format = originalChart.Serializer.Format; 164 workingChart.Serializer.Load(ms); 165 } 166 167 foreach (var s in workingChart.Series.Where(x => !x.Points.Any()).ToArray()) 168 s.IsVisibleInLegend = false; 166 169 167 170 originalChart.Serializer.Content = prevContent; … … 180 183 showSecondaryXAxisCheckBox.Checked = originalChart.Series.Any(x => x.XAxisType == AxisType.Secondary); 181 184 showSecondaryYAxisCheckBox.Checked = originalChart.Series.Any(x => x.YAxisType == AxisType.Secondary); 185 186 if (!workingChart.Legends.Any()) { 187 legendPositionComboBox.Enabled = false; 188 legendFontSizeComboBox.Enabled = false; 189 } else { 190 legendPositionComboBox.Enabled = true; 191 legendFontSizeComboBox.Enabled = true; 192 if (workingChart.Legends[0].Enabled) { 193 switch (workingChart.Legends[0].Docking) { 194 case Docking.Top: 195 legendPositionComboBox.SelectedItem = "Top"; 196 break; 197 case Docking.Right: 198 legendPositionComboBox.SelectedItem = "Right"; 199 break; 200 case Docking.Bottom: 201 legendPositionComboBox.SelectedItem = "Bottom"; 202 break; 203 case Docking.Left: 204 legendPositionComboBox.SelectedItem = "Left"; 205 break; 206 } 207 } else { 208 legendPositionComboBox.SelectedItem = "Hidden"; 209 } 210 } 182 211 } finally { SuppressEvents = false; } 183 212 base.OnShown(e); … … 199 228 if (chartAreaComboBox.SelectedIndex >= 0) 200 229 UpdateFields(); 230 } 231 232 private void legendPositionComboBox_SelectedIndexChanged(object sender, EventArgs e) { 233 if (!SuppressEvents) { 234 if (legendPositionComboBox.SelectedIndex >= 0) { 235 var legend = workingChart.Legends[0]; 236 var legendPosition = legendPositionComboBox.Items[legendPositionComboBox.SelectedIndex].ToString(); 237 if (legendPosition != "Hidden" && !legend.Enabled) 238 legend.Enabled = true; 239 switch (legendPosition) { 240 case "Top": 241 legend.Docking = Docking.Top; 242 break; 243 case "Right": 244 legend.Docking = Docking.Right; 245 break; 246 case "Bottom": 247 legend.Docking = Docking.Bottom; 248 break; 249 case "Left": 250 legend.Docking = Docking.Left; 251 break; 252 case "Hidden": 253 legend.Enabled = false; 254 break; 255 } 256 } 257 UpdatePreview(); 258 } 201 259 } 202 260
Note: See TracChangeset
for help on using the changeset viewer.