Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9496


Ignore:
Timestamp:
05/16/13 09:11:15 (12 years ago)
Author:
abeham
Message:

#2054:

  • Added check boxes to hide or show a certain axis
  • Fixed tab order
  • Changed some of the default values
  • Improved layout of controls
  • Clear title if the text is set to empty
  • Added tooltips to most controls
Location:
trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj

    r8600 r9496  
    156156  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    157157  <PropertyGroup>
    158    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     158    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    159159set ProjectDir=$(ProjectDir)
    160160set SolutionDir=$(SolutionDir)
     
    163163call PreBuildEvent.cmd
    164164</PreBuildEvent>
    165 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     165    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
    166166export ProjectDir=$(ProjectDir)
    167167export SolutionDir=$(SolutionDir)
  • trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/ImageExportDialog.Designer.cs

    r9456 r9496  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.components = new System.ComponentModel.Container();
    4748      this.titleTextBox = new System.Windows.Forms.TextBox();
    4849      this.label1 = new System.Windows.Forms.Label();
     
    6364      this.label10 = new System.Windows.Forms.Label();
    6465      this.groupBox1 = new System.Windows.Forms.GroupBox();
     66      this.showSecondaryYAxisCheckBox = new System.Windows.Forms.CheckBox();
     67      this.showSecondaryXAxisCheckBox = new System.Windows.Forms.CheckBox();
    6568      this.groupBox2 = new System.Windows.Forms.GroupBox();
     69      this.showPrimaryYAxisCheckBox = new System.Windows.Forms.CheckBox();
     70      this.showPrimaryXAxisCheckBox = new System.Windows.Forms.CheckBox();
    6671      this.primaryXTextBox = new System.Windows.Forms.TextBox();
    6772      this.primaryYTextBox = new System.Windows.Forms.TextBox();
     
    8590      this.label8 = new System.Windows.Forms.Label();
    8691      this.previewPictureBox = new System.Windows.Forms.PictureBox();
     92      this.label19 = new System.Windows.Forms.Label();
    8793      this.label13 = new System.Windows.Forms.Label();
     94      this.rawImageSizeLabel = new System.Windows.Forms.Label();
    8895      this.previewZoomLabel = new System.Windows.Forms.Label();
    8996      this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
    90       this.label19 = new System.Windows.Forms.Label();
    91       this.rawImageSizeLabel = new System.Windows.Forms.Label();
     97      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    9298      ((System.ComponentModel.ISupportInitialize)(this.widthNumericUD)).BeginInit();
    9399      this.groupBox1.SuspendLayout();
     
    104110      // titleTextBox
    105111      //
    106       this.titleTextBox.Location = new System.Drawing.Point(62, 11);
     112      this.titleTextBox.Location = new System.Drawing.Point(84, 11);
    107113      this.titleTextBox.Name = "titleTextBox";
    108       this.titleTextBox.Size = new System.Drawing.Size(203, 20);
     114      this.titleTextBox.Size = new System.Drawing.Size(159, 20);
    109115      this.titleTextBox.TabIndex = 1;
     116      this.toolTip.SetToolTip(this.titleTextBox, "The title of the chart, will be removed if set to empty.");
    110117      this.titleTextBox.TextChanged += new System.EventHandler(this.titleTextBox_TextChanged);
    111118      //
     
    126133      this.okButton.Name = "okButton";
    127134      this.okButton.Size = new System.Drawing.Size(75, 23);
    128       this.okButton.TabIndex = 13;
     135      this.okButton.TabIndex = 2;
    129136      this.okButton.Text = "Save";
    130137      this.okButton.UseVisualStyleBackColor = true;
     
    134141      //
    135142      this.label2.AutoSize = true;
    136       this.label2.Location = new System.Drawing.Point(10, 14);
     143      this.label2.Location = new System.Drawing.Point(18, 14);
    137144      this.label2.Name = "label2";
    138       this.label2.Size = new System.Drawing.Size(30, 13);
     145      this.label2.Size = new System.Drawing.Size(54, 13);
    139146      this.label2.TabIndex = 0;
    140       this.label2.Text = "Title:";
     147      this.label2.Text = "Title Text:";
    141148      //
    142149      // secondaryXTextBox
    143150      //
    144       this.secondaryXTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    145                   | System.Windows.Forms.AnchorStyles.Right)));
    146       this.secondaryXTextBox.Location = new System.Drawing.Point(49, 27);
     151      this.secondaryXTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     152            | System.Windows.Forms.AnchorStyles.Right)));
     153      this.secondaryXTextBox.Location = new System.Drawing.Point(72, 27);
    147154      this.secondaryXTextBox.Name = "secondaryXTextBox";
    148       this.secondaryXTextBox.Size = new System.Drawing.Size(203, 20);
     155      this.secondaryXTextBox.Size = new System.Drawing.Size(159, 20);
    149156      this.secondaryXTextBox.TabIndex = 1;
     157      this.toolTip.SetToolTip(this.secondaryXTextBox, "Label of the secondary x-axis");
    150158      this.secondaryXTextBox.TextChanged += new System.EventHandler(this.secondaryXTextBox_TextChanged);
    151159      //
     
    155163      this.label3.Location = new System.Drawing.Point(6, 30);
    156164      this.label3.Name = "label3";
    157       this.label3.Size = new System.Drawing.Size(23, 13);
     165      this.label3.Size = new System.Drawing.Size(46, 13);
    158166      this.label3.TabIndex = 0;
    159       this.label3.Text = "X2:";
     167      this.label3.Text = "X Label:";
    160168      //
    161169      // secondaryYTextBox
    162170      //
    163       this.secondaryYTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    164                   | System.Windows.Forms.AnchorStyles.Right)));
    165       this.secondaryYTextBox.Location = new System.Drawing.Point(49, 53);
     171      this.secondaryYTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     172            | System.Windows.Forms.AnchorStyles.Right)));
     173      this.secondaryYTextBox.Location = new System.Drawing.Point(72, 53);
    166174      this.secondaryYTextBox.Name = "secondaryYTextBox";
    167       this.secondaryYTextBox.Size = new System.Drawing.Size(203, 20);
    168       this.secondaryYTextBox.TabIndex = 3;
     175      this.secondaryYTextBox.Size = new System.Drawing.Size(159, 20);
     176      this.secondaryYTextBox.TabIndex = 4;
     177      this.toolTip.SetToolTip(this.secondaryYTextBox, "Label of the secondary y-axis");
    169178      this.secondaryYTextBox.TextChanged += new System.EventHandler(this.secondaryYTextBox_TextChanged);
    170179      //
     
    174183      this.label4.Location = new System.Drawing.Point(6, 56);
    175184      this.label4.Name = "label4";
    176       this.label4.Size = new System.Drawing.Size(23, 13);
    177       this.label4.TabIndex = 2;
    178       this.label4.Text = "Y2:";
     185      this.label4.Size = new System.Drawing.Size(46, 13);
     186      this.label4.TabIndex = 3;
     187      this.label4.Text = "Y Label:";
    179188      //
    180189      // resolutionComboBox
     
    185194            "96",
    186195            "150",
    187             "300"});
    188       this.resolutionComboBox.Location = new System.Drawing.Point(76, 383);
     196            "300",
     197            "600",
     198            "800",
     199            "1200"});
     200      this.resolutionComboBox.Location = new System.Drawing.Point(84, 383);
    189201      this.resolutionComboBox.Name = "resolutionComboBox";
    190       this.resolutionComboBox.Size = new System.Drawing.Size(75, 21);
    191       this.resolutionComboBox.TabIndex = 6;
     202      this.resolutionComboBox.Size = new System.Drawing.Size(83, 21);
     203      this.resolutionComboBox.TabIndex = 8;
     204      this.toolTip.SetToolTip(this.resolutionComboBox, "Specify the resolution of the output image, use a minimum of 300dpi if the image " +
     205        "should appear in a publication.");
    192206      this.resolutionComboBox.TextChanged += new System.EventHandler(this.resolutionComboBox_TextChanged);
    193207      this.resolutionComboBox.Validating += new System.ComponentModel.CancelEventHandler(this.resolutionComboBox_Validating);
     
    201215            0,
    202216            65536});
    203       this.widthNumericUD.Location = new System.Drawing.Point(76, 410);
     217      this.widthNumericUD.Location = new System.Drawing.Point(84, 410);
    204218      this.widthNumericUD.Minimum = new decimal(new int[] {
    205219            1,
     
    208222            65536});
    209223      this.widthNumericUD.Name = "widthNumericUD";
    210       this.widthNumericUD.Size = new System.Drawing.Size(75, 20);
    211       this.widthNumericUD.TabIndex = 8;
     224      this.widthNumericUD.Size = new System.Drawing.Size(83, 20);
     225      this.widthNumericUD.TabIndex = 11;
    212226      this.widthNumericUD.Value = new decimal(new int[] {
    213227            8,
     
    220234      //
    221235      this.label5.AutoSize = true;
    222       this.label5.Location = new System.Drawing.Point(10, 386);
     236      this.label5.Location = new System.Drawing.Point(18, 386);
    223237      this.label5.Name = "label5";
    224238      this.label5.Size = new System.Drawing.Size(60, 13);
    225       this.label5.TabIndex = 5;
     239      this.label5.TabIndex = 7;
    226240      this.label5.Text = "Resolution:";
    227241      //
     
    229243      //
    230244      this.label6.AutoSize = true;
    231       this.label6.Location = new System.Drawing.Point(10, 412);
     245      this.label6.Location = new System.Drawing.Point(18, 412);
    232246      this.label6.Name = "label6";
    233247      this.label6.Size = new System.Drawing.Size(38, 13);
    234       this.label6.TabIndex = 7;
     248      this.label6.TabIndex = 10;
    235249      this.label6.Text = "Width:";
    236250      //
    237251      // axisFontSizeComboBox
    238252      //
    239       this.axisFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    240                   | System.Windows.Forms.AnchorStyles.Right)));
     253      this.axisFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     254            | System.Windows.Forms.AnchorStyles.Right)));
    241255      this.axisFontSizeComboBox.FormattingEnabled = true;
    242256      this.axisFontSizeComboBox.Items.AddRange(new object[] {
     
    252266            "36",
    253267            "72"});
    254       this.axisFontSizeComboBox.Location = new System.Drawing.Point(54, 46);
     268      this.axisFontSizeComboBox.Location = new System.Drawing.Point(72, 46);
    255269      this.axisFontSizeComboBox.Name = "axisFontSizeComboBox";
    256       this.axisFontSizeComboBox.Size = new System.Drawing.Size(84, 21);
    257       this.axisFontSizeComboBox.TabIndex = 3;
     270      this.axisFontSizeComboBox.Size = new System.Drawing.Size(159, 21);
     271      this.axisFontSizeComboBox.TabIndex = 4;
     272      this.toolTip.SetToolTip(this.axisFontSizeComboBox, "The font size of the axis labels");
    258273      this.axisFontSizeComboBox.TextChanged += new System.EventHandler(this.axisFontSizeComboBox_TextChanged);
    259274      this.axisFontSizeComboBox.Validating += new System.ComponentModel.CancelEventHandler(this.numericComboBox_Validating);
     
    261276      // scalesFontSizeComboBox
    262277      //
    263       this.scalesFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    264                   | System.Windows.Forms.AnchorStyles.Right)));
     278      this.scalesFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     279            | System.Windows.Forms.AnchorStyles.Right)));
    265280      this.scalesFontSizeComboBox.FormattingEnabled = true;
    266281      this.scalesFontSizeComboBox.Items.AddRange(new object[] {
     
    280295            "36",
    281296            "72"});
    282       this.scalesFontSizeComboBox.Location = new System.Drawing.Point(54, 73);
     297      this.scalesFontSizeComboBox.Location = new System.Drawing.Point(72, 73);
    283298      this.scalesFontSizeComboBox.Name = "scalesFontSizeComboBox";
    284       this.scalesFontSizeComboBox.Size = new System.Drawing.Size(84, 21);
    285       this.scalesFontSizeComboBox.TabIndex = 5;
     299      this.scalesFontSizeComboBox.Size = new System.Drawing.Size(159, 21);
     300      this.scalesFontSizeComboBox.TabIndex = 7;
     301      this.toolTip.SetToolTip(this.scalesFontSizeComboBox, "The font size of the scales");
    286302      this.scalesFontSizeComboBox.TextChanged += new System.EventHandler(this.scalesFontSizeComboBox_TextChanged);
    287303      this.scalesFontSizeComboBox.Validating += new System.ComponentModel.CancelEventHandler(this.numericComboBox_Validating);
     
    293309      this.cancelButton.Name = "cancelButton";
    294310      this.cancelButton.Size = new System.Drawing.Size(75, 23);
    295       this.cancelButton.TabIndex = 14;
     311      this.cancelButton.TabIndex = 0;
    296312      this.cancelButton.Text = "Cancel";
    297313      this.cancelButton.UseVisualStyleBackColor = true;
     
    301317      //
    302318      this.label9.AutoSize = true;
    303       this.label9.Location = new System.Drawing.Point(6, 51);
     319      this.label9.Location = new System.Drawing.Point(6, 49);
    304320      this.label9.Name = "label9";
    305321      this.label9.Size = new System.Drawing.Size(29, 13);
    306       this.label9.TabIndex = 2;
     322      this.label9.TabIndex = 3;
    307323      this.label9.Text = "Axis:";
    308324      //
     
    313329      this.label10.Name = "label10";
    314330      this.label10.Size = new System.Drawing.Size(42, 13);
    315       this.label10.TabIndex = 4;
     331      this.label10.TabIndex = 6;
    316332      this.label10.Text = "Scales:";
    317333      //
    318334      // groupBox1
    319335      //
     336      this.groupBox1.Controls.Add(this.showSecondaryYAxisCheckBox);
     337      this.groupBox1.Controls.Add(this.showSecondaryXAxisCheckBox);
    320338      this.groupBox1.Controls.Add(this.secondaryXTextBox);
    321339      this.groupBox1.Controls.Add(this.secondaryYTextBox);
     
    325343      this.groupBox1.Name = "groupBox1";
    326344      this.groupBox1.Size = new System.Drawing.Size(258, 82);
    327       this.groupBox1.TabIndex = 3;
     345      this.groupBox1.TabIndex = 5;
    328346      this.groupBox1.TabStop = false;
    329347      this.groupBox1.Text = "Secondary Axis";
    330348      //
     349      // showSecondaryYAxisCheckBox
     350      //
     351      this.showSecondaryYAxisCheckBox.AutoSize = true;
     352      this.showSecondaryYAxisCheckBox.Location = new System.Drawing.Point(237, 56);
     353      this.showSecondaryYAxisCheckBox.Name = "showSecondaryYAxisCheckBox";
     354      this.showSecondaryYAxisCheckBox.Size = new System.Drawing.Size(15, 14);
     355      this.showSecondaryYAxisCheckBox.TabIndex = 5;
     356      this.toolTip.SetToolTip(this.showSecondaryYAxisCheckBox, "Display");
     357      this.showSecondaryYAxisCheckBox.UseVisualStyleBackColor = true;
     358      this.showSecondaryYAxisCheckBox.CheckedChanged += new System.EventHandler(this.showSecondaryYAxisCheckBox_CheckedChanged);
     359      //
     360      // showSecondaryXAxisCheckBox
     361      //
     362      this.showSecondaryXAxisCheckBox.AutoSize = true;
     363      this.showSecondaryXAxisCheckBox.Location = new System.Drawing.Point(237, 30);
     364      this.showSecondaryXAxisCheckBox.Name = "showSecondaryXAxisCheckBox";
     365      this.showSecondaryXAxisCheckBox.Size = new System.Drawing.Size(15, 14);
     366      this.showSecondaryXAxisCheckBox.TabIndex = 2;
     367      this.toolTip.SetToolTip(this.showSecondaryXAxisCheckBox, "Display");
     368      this.showSecondaryXAxisCheckBox.UseVisualStyleBackColor = true;
     369      this.showSecondaryXAxisCheckBox.CheckedChanged += new System.EventHandler(this.showSecondaryXAxisCheckBox_CheckedChanged);
     370      //
    331371      // groupBox2
    332372      //
     373      this.groupBox2.Controls.Add(this.showPrimaryYAxisCheckBox);
     374      this.groupBox2.Controls.Add(this.showPrimaryXAxisCheckBox);
    333375      this.groupBox2.Controls.Add(this.primaryXTextBox);
    334376      this.groupBox2.Controls.Add(this.primaryYTextBox);
     
    338380      this.groupBox2.Name = "groupBox2";
    339381      this.groupBox2.Size = new System.Drawing.Size(258, 84);
    340       this.groupBox2.TabIndex = 2;
     382      this.groupBox2.TabIndex = 4;
    341383      this.groupBox2.TabStop = false;
    342384      this.groupBox2.Text = "Primary Axis";
    343385      //
     386      // showPrimaryYAxisCheckBox
     387      //
     388      this.showPrimaryYAxisCheckBox.AutoSize = true;
     389      this.showPrimaryYAxisCheckBox.Location = new System.Drawing.Point(237, 56);
     390      this.showPrimaryYAxisCheckBox.Name = "showPrimaryYAxisCheckBox";
     391      this.showPrimaryYAxisCheckBox.Size = new System.Drawing.Size(15, 14);
     392      this.showPrimaryYAxisCheckBox.TabIndex = 5;
     393      this.toolTip.SetToolTip(this.showPrimaryYAxisCheckBox, "Display");
     394      this.showPrimaryYAxisCheckBox.UseVisualStyleBackColor = true;
     395      this.showPrimaryYAxisCheckBox.CheckedChanged += new System.EventHandler(this.showPrimaryYAxisCheckBox_CheckedChanged);
     396      //
     397      // showPrimaryXAxisCheckBox
     398      //
     399      this.showPrimaryXAxisCheckBox.AutoSize = true;
     400      this.showPrimaryXAxisCheckBox.Location = new System.Drawing.Point(237, 30);
     401      this.showPrimaryXAxisCheckBox.Name = "showPrimaryXAxisCheckBox";
     402      this.showPrimaryXAxisCheckBox.Size = new System.Drawing.Size(15, 14);
     403      this.showPrimaryXAxisCheckBox.TabIndex = 2;
     404      this.toolTip.SetToolTip(this.showPrimaryXAxisCheckBox, "Display");
     405      this.showPrimaryXAxisCheckBox.UseVisualStyleBackColor = true;
     406      this.showPrimaryXAxisCheckBox.CheckedChanged += new System.EventHandler(this.showPrimaryXAxisCheckBox_CheckedChanged);
     407      //
    344408      // primaryXTextBox
    345409      //
    346       this.primaryXTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    347                   | System.Windows.Forms.AnchorStyles.Right)));
    348       this.primaryXTextBox.Location = new System.Drawing.Point(49, 27);
     410      this.primaryXTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     411            | System.Windows.Forms.AnchorStyles.Right)));
     412      this.primaryXTextBox.Location = new System.Drawing.Point(72, 27);
    349413      this.primaryXTextBox.Name = "primaryXTextBox";
    350       this.primaryXTextBox.Size = new System.Drawing.Size(203, 20);
     414      this.primaryXTextBox.Size = new System.Drawing.Size(159, 20);
    351415      this.primaryXTextBox.TabIndex = 1;
     416      this.toolTip.SetToolTip(this.primaryXTextBox, "Label of the primary x-axis");
    352417      this.primaryXTextBox.TextChanged += new System.EventHandler(this.primaryXTextBox_TextChanged);
    353418      //
    354419      // primaryYTextBox
    355420      //
    356       this.primaryYTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    357                   | System.Windows.Forms.AnchorStyles.Right)));
    358       this.primaryYTextBox.Location = new System.Drawing.Point(49, 53);
     421      this.primaryYTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     422            | System.Windows.Forms.AnchorStyles.Right)));
     423      this.primaryYTextBox.Location = new System.Drawing.Point(72, 53);
    359424      this.primaryYTextBox.Name = "primaryYTextBox";
    360       this.primaryYTextBox.Size = new System.Drawing.Size(203, 20);
    361       this.primaryYTextBox.TabIndex = 3;
     425      this.primaryYTextBox.Size = new System.Drawing.Size(159, 20);
     426      this.primaryYTextBox.TabIndex = 4;
     427      this.toolTip.SetToolTip(this.primaryYTextBox, "Label of the primary y-axis");
    362428      this.primaryYTextBox.TextChanged += new System.EventHandler(this.primaryYTextBox_TextChanged);
    363429      //
     
    367433      this.label14.Location = new System.Drawing.Point(6, 56);
    368434      this.label14.Name = "label14";
    369       this.label14.Size = new System.Drawing.Size(17, 13);
    370       this.label14.TabIndex = 2;
    371       this.label14.Text = "Y:";
     435      this.label14.Size = new System.Drawing.Size(46, 13);
     436      this.label14.TabIndex = 3;
     437      this.label14.Text = "Y Label:";
    372438      //
    373439      // label15
     
    376442      this.label15.Location = new System.Drawing.Point(6, 30);
    377443      this.label15.Name = "label15";
    378       this.label15.Size = new System.Drawing.Size(17, 13);
     444      this.label15.Size = new System.Drawing.Size(46, 13);
    379445      this.label15.TabIndex = 0;
    380       this.label15.Text = "X:";
     446      this.label15.Text = "X Label:";
    381447      //
    382448      // groupBox3
     
    397463      this.groupBox3.Name = "groupBox3";
    398464      this.groupBox3.Size = new System.Drawing.Size(258, 131);
    399       this.groupBox3.TabIndex = 4;
     465      this.groupBox3.TabIndex = 6;
    400466      this.groupBox3.TabStop = false;
    401467      this.groupBox3.Text = "Font Size";
     
    404470      //
    405471      this.label18.AutoSize = true;
    406       this.label18.Location = new System.Drawing.Point(144, 105);
     472      this.label18.Location = new System.Drawing.Point(234, 105);
    407473      this.label18.Name = "label18";
    408474      this.label18.Size = new System.Drawing.Size(16, 13);
    409       this.label18.TabIndex = 0;
     475      this.label18.TabIndex = 11;
    410476      this.label18.Text = "pt";
    411477      //
     
    413479      //
    414480      this.label12.AutoSize = true;
    415       this.label12.Location = new System.Drawing.Point(144, 78);
     481      this.label12.Location = new System.Drawing.Point(234, 78);
    416482      this.label12.Name = "label12";
    417483      this.label12.Size = new System.Drawing.Size(16, 13);
    418       this.label12.TabIndex = 0;
     484      this.label12.TabIndex = 8;
    419485      this.label12.Text = "pt";
    420486      //
     
    422488      //
    423489      this.label11.AutoSize = true;
    424       this.label11.Location = new System.Drawing.Point(144, 51);
     490      this.label11.Location = new System.Drawing.Point(234, 49);
    425491      this.label11.Name = "label11";
    426492      this.label11.Size = new System.Drawing.Size(16, 13);
    427       this.label11.TabIndex = 0;
     493      this.label11.TabIndex = 5;
    428494      this.label11.Text = "pt";
    429495      //
     
    431497      //
    432498      this.label7.AutoSize = true;
    433       this.label7.Location = new System.Drawing.Point(144, 22);
     499      this.label7.Location = new System.Drawing.Point(234, 22);
    434500      this.label7.Name = "label7";
    435501      this.label7.Size = new System.Drawing.Size(16, 13);
    436       this.label7.TabIndex = 0;
     502      this.label7.TabIndex = 2;
    437503      this.label7.Text = "pt";
    438504      //
    439505      // legendFontSizeComboBox
    440506      //
    441       this.legendFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    442                   | System.Windows.Forms.AnchorStyles.Right)));
     507      this.legendFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     508            | System.Windows.Forms.AnchorStyles.Right)));
    443509      this.legendFontSizeComboBox.FormattingEnabled = true;
    444510      this.legendFontSizeComboBox.Items.AddRange(new object[] {
     
    458524            "36",
    459525            "72"});
    460       this.legendFontSizeComboBox.Location = new System.Drawing.Point(54, 100);
     526      this.legendFontSizeComboBox.Location = new System.Drawing.Point(72, 100);
    461527      this.legendFontSizeComboBox.Name = "legendFontSizeComboBox";
    462       this.legendFontSizeComboBox.Size = new System.Drawing.Size(84, 21);
    463       this.legendFontSizeComboBox.TabIndex = 5;
     528      this.legendFontSizeComboBox.Size = new System.Drawing.Size(159, 21);
     529      this.legendFontSizeComboBox.TabIndex = 10;
     530      this.toolTip.SetToolTip(this.legendFontSizeComboBox, "The font size of the legend text");
    464531      this.legendFontSizeComboBox.TextChanged += new System.EventHandler(this.legendFontSizeComboBox_TextChanged);
    465532      this.legendFontSizeComboBox.Validating += new System.ComponentModel.CancelEventHandler(this.numericComboBox_Validating);
     
    471538      this.label17.Name = "label17";
    472539      this.label17.Size = new System.Drawing.Size(46, 13);
    473       this.label17.TabIndex = 4;
     540      this.label17.TabIndex = 9;
    474541      this.label17.Text = "Legend:";
    475542      //
    476543      // titleFontSizeComboBox
    477544      //
    478       this.titleFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    479                   | System.Windows.Forms.AnchorStyles.Right)));
     545      this.titleFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     546            | System.Windows.Forms.AnchorStyles.Right)));
    480547      this.titleFontSizeComboBox.FormattingEnabled = true;
    481548      this.titleFontSizeComboBox.Items.AddRange(new object[] {
     
    491558            "36",
    492559            "72"});
    493       this.titleFontSizeComboBox.Location = new System.Drawing.Point(54, 19);
     560      this.titleFontSizeComboBox.Location = new System.Drawing.Point(72, 19);
    494561      this.titleFontSizeComboBox.Name = "titleFontSizeComboBox";
    495       this.titleFontSizeComboBox.Size = new System.Drawing.Size(84, 21);
     562      this.titleFontSizeComboBox.Size = new System.Drawing.Size(159, 21);
    496563      this.titleFontSizeComboBox.TabIndex = 1;
     564      this.toolTip.SetToolTip(this.titleFontSizeComboBox, "The font size of the title text");
    497565      this.titleFontSizeComboBox.TextChanged += new System.EventHandler(this.titleFontSizeComboBox_TextChanged);
    498566      this.titleFontSizeComboBox.Validating += new System.ComponentModel.CancelEventHandler(this.numericComboBox_Validating);
     
    501569      //
    502570      this.label16.AutoSize = true;
    503       this.label16.Location = new System.Drawing.Point(10, 438);
     571      this.label16.Location = new System.Drawing.Point(18, 438);
    504572      this.label16.Name = "label16";
    505573      this.label16.Size = new System.Drawing.Size(41, 13);
    506       this.label16.TabIndex = 10;
     574      this.label16.TabIndex = 12;
    507575      this.label16.Text = "Height:";
    508576      //
     
    515583            0,
    516584            65536});
    517       this.heightNumericUD.Location = new System.Drawing.Point(76, 436);
     585      this.heightNumericUD.Location = new System.Drawing.Point(84, 436);
    518586      this.heightNumericUD.Minimum = new decimal(new int[] {
    519587            1,
     
    522590            65536});
    523591      this.heightNumericUD.Name = "heightNumericUD";
    524       this.heightNumericUD.Size = new System.Drawing.Size(75, 20);
    525       this.heightNumericUD.TabIndex = 11;
     592      this.heightNumericUD.Size = new System.Drawing.Size(83, 20);
     593      this.heightNumericUD.TabIndex = 13;
    526594      this.heightNumericUD.Value = new decimal(new int[] {
    527             8,
     595            6,
    528596            0,
    529597            0,
     
    567635      this.splitContainer.SplitterDistance = 300;
    568636      this.splitContainer.SplitterWidth = 1;
    569       this.splitContainer.TabIndex = 15;
     637      this.splitContainer.TabIndex = 1;
    570638      //
    571639      // chartAreaComboBox
     
    573641      this.chartAreaComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    574642      this.chartAreaComboBox.FormattingEnabled = true;
    575       this.chartAreaComboBox.Location = new System.Drawing.Point(76, 37);
     643      this.chartAreaComboBox.Location = new System.Drawing.Point(84, 37);
    576644      this.chartAreaComboBox.Name = "chartAreaComboBox";
    577       this.chartAreaComboBox.Size = new System.Drawing.Size(189, 21);
    578       this.chartAreaComboBox.TabIndex = 17;
     645      this.chartAreaComboBox.Size = new System.Drawing.Size(159, 21);
     646      this.chartAreaComboBox.TabIndex = 3;
     647      this.toolTip.SetToolTip(this.chartAreaComboBox, "Select the chart area in case there are multiple.");
    579648      this.chartAreaComboBox.SelectedIndexChanged += new System.EventHandler(this.chartAreaComboBox_SelectedIndexChanged);
    580649      //
    581650      // togglePreviewCheckBox
    582651      //
    583       this.togglePreviewCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    584                   | System.Windows.Forms.AnchorStyles.Left)));
     652      this.togglePreviewCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     653            | System.Windows.Forms.AnchorStyles.Left)));
    585654      this.togglePreviewCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
    586655      this.togglePreviewCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     
    590659      this.togglePreviewCheckBox.TabIndex = 16;
    591660      this.togglePreviewCheckBox.Text = ">";
     661      this.toolTip.SetToolTip(this.togglePreviewCheckBox, "Show or hide the preview pane");
    592662      this.togglePreviewCheckBox.UseVisualStyleBackColor = true;
    593663      this.togglePreviewCheckBox.CheckedChanged += new System.EventHandler(this.togglePreviewCheckBox_CheckedChanged);
     
    597667      this.lengthUnitComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    598668      this.lengthUnitComboBox.FormattingEnabled = true;
    599       this.lengthUnitComboBox.Location = new System.Drawing.Point(157, 422);
     669      this.lengthUnitComboBox.Location = new System.Drawing.Point(173, 422);
    600670      this.lengthUnitComboBox.Name = "lengthUnitComboBox";
    601       this.lengthUnitComboBox.Size = new System.Drawing.Size(108, 21);
    602       this.lengthUnitComboBox.TabIndex = 6;
     671      this.lengthUnitComboBox.Size = new System.Drawing.Size(70, 21);
     672      this.lengthUnitComboBox.TabIndex = 14;
    603673      this.lengthUnitComboBox.SelectedIndexChanged += new System.EventHandler(this.lengthUnitComboBox_SelectedIndexChanged);
    604674      //
     
    607677      this.resolutionUnitComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    608678      this.resolutionUnitComboBox.FormattingEnabled = true;
    609       this.resolutionUnitComboBox.Location = new System.Drawing.Point(157, 383);
     679      this.resolutionUnitComboBox.Location = new System.Drawing.Point(173, 383);
    610680      this.resolutionUnitComboBox.Name = "resolutionUnitComboBox";
    611       this.resolutionUnitComboBox.Size = new System.Drawing.Size(108, 21);
    612       this.resolutionUnitComboBox.TabIndex = 6;
     681      this.resolutionUnitComboBox.Size = new System.Drawing.Size(70, 21);
     682      this.resolutionUnitComboBox.TabIndex = 9;
    613683      this.resolutionUnitComboBox.SelectedIndexChanged += new System.EventHandler(this.resolutionUnitComboBox_SelectedIndexChanged);
    614684      //
     
    616686      //
    617687      this.label8.AutoSize = true;
    618       this.label8.Location = new System.Drawing.Point(10, 40);
     688      this.label8.Location = new System.Drawing.Point(18, 40);
    619689      this.label8.Name = "label8";
    620       this.label8.Size = new System.Drawing.Size(60, 13);
    621       this.label8.TabIndex = 0;
    622       this.label8.Text = "Chart Area:";
     690      this.label8.Size = new System.Drawing.Size(32, 13);
     691      this.label8.TabIndex = 2;
     692      this.label8.Text = "Area:";
    623693      //
    624694      // previewPictureBox
     
    631701      this.previewPictureBox.TabStop = false;
    632702      //
     703      // label19
     704      //
     705      this.label19.AutoSize = true;
     706      this.label19.Location = new System.Drawing.Point(85, 459);
     707      this.label19.Name = "label19";
     708      this.label19.Size = new System.Drawing.Size(84, 13);
     709      this.label19.TabIndex = 10;
     710      this.label19.Text = "Raw image size:";
     711      //
    633712      // label13
    634713      //
     
    640719      this.label13.Text = "Zoom:";
    641720      //
     721      // rawImageSizeLabel
     722      //
     723      this.rawImageSizeLabel.AutoSize = true;
     724      this.rawImageSizeLabel.Location = new System.Drawing.Point(175, 459);
     725      this.rawImageSizeLabel.Name = "rawImageSizeLabel";
     726      this.rawImageSizeLabel.Size = new System.Drawing.Size(37, 13);
     727      this.rawImageSizeLabel.TabIndex = 10;
     728      this.rawImageSizeLabel.Text = "0.00M";
     729      //
    642730      // previewZoomLabel
    643731      //
     
    652740      //
    653741      this.saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|EMF (*.emf)|*.emf|PNG (*.png)|*.png|GIF (" +
    654           "*.gif)|*.gif|TIFF (*.tif)|*.tif\"";
     742    "*.gif)|*.gif|TIFF (*.tif)|*.tif\"";
    655743      this.saveFileDialog.FilterIndex = 2;
    656744      //
    657       // label19
    658       //
    659       this.label19.AutoSize = true;
    660       this.label19.Location = new System.Drawing.Point(85, 459);
    661       this.label19.Name = "label19";
    662       this.label19.Size = new System.Drawing.Size(84, 13);
    663       this.label19.TabIndex = 10;
    664       this.label19.Text = "Raw image size:";
    665       //
    666       // rawImageSizeLabel
    667       //
    668       this.rawImageSizeLabel.AutoSize = true;
    669       this.rawImageSizeLabel.Location = new System.Drawing.Point(175, 459);
    670       this.rawImageSizeLabel.Name = "rawImageSizeLabel";
    671       this.rawImageSizeLabel.Size = new System.Drawing.Size(37, 13);
    672       this.rawImageSizeLabel.TabIndex = 10;
    673       this.rawImageSizeLabel.Text = "0.00M";
    674       //
    675745      // ImageExportDialog
    676746      //
    677747      this.AcceptButton = this.okButton;
    678       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    679748      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    680749      this.CancelButton = this.cancelButton;
     
    755824    private System.Windows.Forms.Label label19;
    756825    private System.Windows.Forms.Label rawImageSizeLabel;
     826    private System.Windows.Forms.CheckBox showSecondaryYAxisCheckBox;
     827    private System.Windows.Forms.CheckBox showSecondaryXAxisCheckBox;
     828    private System.Windows.Forms.CheckBox showPrimaryYAxisCheckBox;
     829    private System.Windows.Forms.CheckBox showPrimaryXAxisCheckBox;
     830    private System.Windows.Forms.ToolTip toolTip;
    757831  }
    758832}
  • trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/ImageExportDialog.cs

    r9456 r9496  
    2525using System.Drawing.Imaging;
    2626using System.IO;
     27using System.Linq;
    2728using System.Windows.Forms;
    2829using System.Windows.Forms.DataVisualization.Charting;
     
    5859        else lengthUnitComboBox.SelectedIndex = 0;
    5960
    60         titleFontSizeComboBox.Text = "12";
     61        titleFontSizeComboBox.Text = "10";
    6162        axisFontSizeComboBox.Text = "8";
    6263        scalesFontSizeComboBox.Text = "6";
    6364        legendFontSizeComboBox.Text = "6";
    64         resolutionComboBox.Text = "300";
     65        resolutionComboBox.Text = "150";
    6566        SuppressEvents = false;
    6667        splitContainer.Panel2Collapsed = true;
    6768        Width = 305;
    68         Height = 550;
     69        Height = 560;
    6970      } finally { SuppressEvents = false; }
    7071      #endregion
     
    7273
    7374    private void UpdateFields() {
    74       ChartArea area = GetCurrentChartArea();
     75      var area = GetCurrentChartArea();
    7576
    7677      try {
    7778        SuppressEvents = true;
    7879
    79         if (workingChart.Titles.Count == 0) titleFontSizeComboBox.Text = "12";
     80        if (workingChart.Titles.Count == 0) titleFontSizeComboBox.Text = "10";
    8081        else {
    8182          titleTextBox.Text = workingChart.Titles[0].Text;
     
    9091        axisFontSizeComboBox.Text = area.AxisX.TitleFont.SizeInPoints.ToString();
    9192        scalesFontSizeComboBox.Text = area.AxisX.LabelStyle.Font.SizeInPoints.ToString();
    92         if (workingChart.Legends.Count == 0) legendFontSizeComboBox.Text = "8";
     93        if (workingChart.Legends.Count == 0) legendFontSizeComboBox.Text = "6";
    9394        else legendFontSizeComboBox.Text = workingChart.Legends[0].Font.SizeInPoints.ToString();
    9495      } finally {
     
    121122      }
    122123
    123       float scaleFactor = (float)Math.Min(previewWidth / width, previewHeight / height);
     124      var scaleFactor = (float)Math.Min(previewWidth / width, previewHeight / height);
    124125      if (scaleFactor >= 1) {
    125126        previewZoomLabel.Text = "100%";
     
    129130      rawImageSizeLabel.Text = GetRawImageSizeInMegabytes(width, height).ToString("0.00") + "M   " + "(" + Math.Round(width).ToString("0") + " x " + Math.Round(height).ToString("0") + ") pixels";
    130131
    131       Bitmap image = new Bitmap(previewWidth, previewHeight);
     132      var image = new Bitmap(previewWidth, previewHeight);
    132133      image.SetResolution(dpi, dpi);
    133134      using (Graphics graphics = Graphics.FromImage(image)) {
     
    155156      originalChart.Serializer.Content = SerializationContents.Default;
    156157      originalChart.Serializer.Format = SerializationFormat.Binary;
    157       MemoryStream ms = new MemoryStream();
     158      var ms = new MemoryStream();
    158159      originalChart.Serializer.Save(ms);
    159160
     
    169170
    170171      chartAreaComboBox.Items.Clear();
    171       foreach (ChartArea area in originalChart.ChartAreas) {
     172      foreach (var area in originalChart.ChartAreas) {
    172173        chartAreaComboBox.Items.Add(area.Name);
    173174      }
    174175      chartAreaComboBox.SelectedIndex = 0;
     176      SuppressEvents = true;
     177      try {
     178        showPrimaryXAxisCheckBox.Checked = originalChart.Series.Any(x => x.XAxisType == AxisType.Primary);
     179        showPrimaryYAxisCheckBox.Checked = originalChart.Series.Any(x => x.YAxisType == AxisType.Primary);
     180        showSecondaryXAxisCheckBox.Checked = originalChart.Series.Any(x => x.XAxisType == AxisType.Secondary);
     181        showSecondaryYAxisCheckBox.Checked = originalChart.Series.Any(x => x.YAxisType == AxisType.Secondary);
     182      } finally { SuppressEvents = false; }
    175183      base.OnShown(e);
    176184
     
    195203    private void titleTextBox_TextChanged(object sender, EventArgs e) {
    196204      if (!SuppressEvents) {
    197         if (workingChart.Titles.Count > 0) {
    198           workingChart.Titles[0].Text = titleTextBox.Text;
    199         } else {
    200           Title t = new Title(titleTextBox.Text);
    201           t.Font = ChangeFontSizePt(t.Font, float.Parse(titleFontSizeComboBox.Text));
    202           workingChart.Titles.Add(t);
     205        if (string.IsNullOrEmpty(titleTextBox.Text))
     206          workingChart.Titles.Clear();
     207        else {
     208          if (workingChart.Titles.Count > 0) {
     209            workingChart.Titles[0].Text = titleTextBox.Text;
     210          } else {
     211            var t = new Title(titleTextBox.Text);
     212            t.Font = ChangeFontSizePt(t.Font, float.Parse(titleFontSizeComboBox.Text));
     213            workingChart.Titles.Add(t);
     214          }
    203215        }
    204216        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    208220    private void primaryXTextBox_TextChanged(object sender, EventArgs e) {
    209221      if (!SuppressEvents) {
    210         ChartArea area = GetCurrentChartArea();
     222        var area = GetCurrentChartArea();
    211223        area.AxisX.Title = primaryXTextBox.Text;
    212224        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    216228    private void primaryYTextBox_TextChanged(object sender, EventArgs e) {
    217229      if (!SuppressEvents) {
    218         ChartArea area = GetCurrentChartArea();
     230        var area = GetCurrentChartArea();
    219231        area.AxisY.Title = primaryYTextBox.Text;
    220232        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    224236    private void secondaryXTextBox_TextChanged(object sender, EventArgs e) {
    225237      if (!SuppressEvents) {
    226         ChartArea area = GetCurrentChartArea();
     238        var area = GetCurrentChartArea();
    227239        area.AxisX2.Title = secondaryXTextBox.Text;
    228240        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    232244    private void secondaryYTextBox_TextChanged(object sender, EventArgs e) {
    233245      if (!SuppressEvents) {
    234         ChartArea area = GetCurrentChartArea();
     246        var area = GetCurrentChartArea();
    235247        area.AxisY2.Title = secondaryYTextBox.Text;
     248        if (togglePreviewCheckBox.Checked) UpdatePreview();
     249      }
     250    }
     251
     252    private void showPrimaryXAxisCheckBox_CheckedChanged(object sender, EventArgs e) {
     253      if (!SuppressEvents) {
     254        var area = GetCurrentChartArea();
     255        var isChecked = ((CheckBox)sender).Checked;
     256        area.AxisX.Enabled = isChecked ? AxisEnabled.True : AxisEnabled.False;
     257        if (togglePreviewCheckBox.Checked) UpdatePreview();
     258      }
     259    }
     260
     261    private void showPrimaryYAxisCheckBox_CheckedChanged(object sender, EventArgs e) {
     262      if (!SuppressEvents) {
     263        var area = GetCurrentChartArea();
     264        var isChecked = ((CheckBox)sender).Checked;
     265        area.AxisY.Enabled = isChecked ? AxisEnabled.True : AxisEnabled.False;
     266        if (togglePreviewCheckBox.Checked) UpdatePreview();
     267      }
     268    }
     269
     270    private void showSecondaryXAxisCheckBox_CheckedChanged(object sender, EventArgs e) {
     271      if (!SuppressEvents) {
     272        var area = GetCurrentChartArea();
     273        var isChecked = ((CheckBox)sender).Checked;
     274        area.AxisX2.Enabled = isChecked ? AxisEnabled.True : AxisEnabled.False;
     275        if (togglePreviewCheckBox.Checked) UpdatePreview();
     276      }
     277    }
     278
     279    private void showSecondaryYAxisCheckBox_CheckedChanged(object sender, EventArgs e) {
     280      if (!SuppressEvents) {
     281        var area = GetCurrentChartArea();
     282        var isChecked = ((CheckBox)sender).Checked;
     283        area.AxisY2.Enabled = isChecked ? AxisEnabled.True : AxisEnabled.False;
    236284        if (togglePreviewCheckBox.Checked) UpdatePreview();
    237285      }
     
    270318        float fontSize;
    271319        if (float.TryParse(axisFontSizeComboBox.Text, out fontSize)) {
    272           ChartArea area = GetCurrentChartArea();
    273           foreach (Axis a in area.Axes) {
     320          var area = GetCurrentChartArea();
     321          foreach (Axis a in area.Axes)
    274322            a.TitleFont = ChangeFontSizePt(a.TitleFont, fontSize);
    275           }
    276323        }
    277324        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    283330        float fontSize;
    284331        if (float.TryParse(scalesFontSizeComboBox.Text, out fontSize)) {
    285           ChartArea area = GetCurrentChartArea();
    286           foreach (Axis a in area.Axes) {
     332          var area = GetCurrentChartArea();
     333          foreach (var a in area.Axes)
    287334            a.LabelStyle.Font = ChangeFontSizePt(a.LabelStyle.Font, fontSize);
    288           }
    289335        }
    290336        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    296342        float fontSize;
    297343        if (float.TryParse(legendFontSizeComboBox.Text, out fontSize)) {
    298           foreach (Legend l in workingChart.Legends) {
     344          foreach (var l in workingChart.Legends)
    299345            l.Font = ChangeFontSizePt(l.Font, fontSize);
    300           }
    301346        }
    302347        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    336381      GetImageParameters(out dpi, out width, out height);
    337382
    338       Bitmap image = new Bitmap((int)Math.Round(width), (int)Math.Round(height));
     383      var image = new Bitmap((int)Math.Round(width), (int)Math.Round(height));
    339384      image.SetResolution(dpi, dpi);
    340       using (Graphics graphics = Graphics.FromImage(image)) {
     385      using (var graphics = Graphics.FromImage(image)) {
    341386        workingChart.Printing.PrintPaint(graphics, new Rectangle(0, 0, image.Width, image.Height));
    342387      }
     
    344389      if (titleTextBox.Text.Trim() != String.Empty) saveFileDialog.FileName = titleTextBox.Text.Trim();
    345390      if (saveFileDialog.ShowDialog() == DialogResult.OK) {
    346         ImageFormat format = ImageFormat.Bmp;
    347         string filename = saveFileDialog.FileName.ToLower();
     391        var format = ImageFormat.Bmp;
     392        var filename = saveFileDialog.FileName.ToLower();
    348393        if (filename.EndsWith("jpg")) {
    349394          format = ImageFormat.Jpeg;
Note: See TracChangeset for help on using the changeset viewer.