Changeset 9532


Ignore:
Timestamp:
05/24/13 17:05:17 (6 years ago)
Author:
abeham
Message:

#2054, #2043: merged to stable branch

Location:
stable
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Optimizer/3.3/CreateExperimentDialog.cs

    r9456 r9532  
    122122        if (e.Item.Checked) multipleChoiceParameters.Add(parameter, new HashSet<IItem>());
    123123        else multipleChoiceParameters.Remove(parameter);
    124       }
    125 
    126       var intValue = parameter.Value as ValueTypeValue<int>;
    127       if (intValue != null) {
    128         if (e.Item.Checked) {
    129           IntArray initialValues;
    130           if (intValue.Value == int.MinValue)
    131             initialValues = new IntArray(new int[] { -100, -50, 5 });
    132           else if (intValue.Value == int.MaxValue)
    133             initialValues = new IntArray(new int[] { 5, 50, 100 });
    134           else if (intValue.Value == 0)
    135             initialValues = new IntArray(new int[] { 0, 1, 2 });
    136           else if (Math.Abs(intValue.Value) < 10)
    137             initialValues = new IntArray(new int[] { intValue.Value - 1, intValue.Value, intValue.Value + 1 });
    138           else initialValues = new IntArray(new int[] { intValue.Value / 2, intValue.Value, intValue.Value * 2 });
    139           intParameters.Add(parameter, initialValues);
    140           intParameters[parameter].Reset += new EventHandler(ValuesArray_Reset);
    141         } else intParameters.Remove(parameter);
    142       }
    143 
    144       var doubleValue = parameter.Value as ValueTypeValue<double>;
    145       if (doubleValue != null) {
    146         if (e.Item.Checked) {
    147           DoubleArray initialValues;
    148           if (doubleValue.Value == double.MinValue)
    149             initialValues = new DoubleArray(new double[] { -1, -0.5, 0 });
    150           else if (doubleValue.Value == double.MaxValue)
    151             initialValues = new DoubleArray(new double[] { 0, 0.5, 1 });
    152           else if (doubleValue.Value == 0.0)
    153             initialValues = new DoubleArray(new double[] { 0, 0.1, 0.2 });
    154           else if (Math.Abs(doubleValue.Value) <= 1.0) {
    155             if (doubleValue.Value > 0.9 || (doubleValue.Value < 0.0 && doubleValue.Value > -0.1))
    156               initialValues = new DoubleArray(new double[] { doubleValue.Value - 0.2, doubleValue.Value - 0.1, doubleValue.Value });
    157             else if (doubleValue.Value < -0.9 || (doubleValue.Value > 0 && doubleValue.Value < 0.1))
    158               initialValues = new DoubleArray(new double[] { doubleValue.Value, doubleValue.Value + 0.1, doubleValue.Value + 0.2 });
    159             else initialValues = new DoubleArray(new double[] { doubleValue.Value - 0.1, doubleValue.Value, doubleValue.Value + 0.1 });
    160           } else initialValues = new DoubleArray(new double[] { doubleValue.Value / 2.0, doubleValue.Value, doubleValue.Value * 2.0 });
    161           doubleParameters.Add(parameter, initialValues);
    162           doubleParameters[parameter].Reset += new EventHandler(ValuesArray_Reset);
    163         } else doubleParameters.Remove(parameter);
    164       }
    165 
    166       var boolValue = parameter.Value as ValueTypeValue<bool>;
    167       if (boolValue != null) {
    168         if (e.Item.Checked) boolParameters.Add(parameter);
    169         else boolParameters.Remove(parameter);
     124      } else {
     125
     126        var intValue = parameter.Value as ValueTypeValue<int>;
     127        if (intValue != null) {
     128          if (e.Item.Checked) {
     129            IntArray initialValues;
     130            if (intValue.Value == int.MinValue)
     131              initialValues = new IntArray(new int[] { -100, -50, 5 });
     132            else if (intValue.Value == int.MaxValue)
     133              initialValues = new IntArray(new int[] { 5, 50, 100 });
     134            else if (intValue.Value == 0)
     135              initialValues = new IntArray(new int[] { 0, 1, 2 });
     136            else if (Math.Abs(intValue.Value) < 10)
     137              initialValues = new IntArray(new int[] { intValue.Value - 1, intValue.Value, intValue.Value + 1 });
     138            else initialValues = new IntArray(new int[] { intValue.Value / 2, intValue.Value, intValue.Value * 2 });
     139            intParameters.Add(parameter, initialValues);
     140            intParameters[parameter].Reset += new EventHandler(ValuesArray_Reset);
     141          } else intParameters.Remove(parameter);
     142        }
     143
     144        var doubleValue = parameter.Value as ValueTypeValue<double>;
     145        if (doubleValue != null) {
     146          if (e.Item.Checked) {
     147            DoubleArray initialValues;
     148            if (doubleValue.Value == double.MinValue)
     149              initialValues = new DoubleArray(new double[] { -1, -0.5, 0 });
     150            else if (doubleValue.Value == double.MaxValue)
     151              initialValues = new DoubleArray(new double[] { 0, 0.5, 1 });
     152            else if (doubleValue.Value == 0.0)
     153              initialValues = new DoubleArray(new double[] { 0, 0.1, 0.2 });
     154            else if (Math.Abs(doubleValue.Value) <= 1.0) {
     155              if (doubleValue.Value > 0.9 || (doubleValue.Value < 0.0 && doubleValue.Value > -0.1))
     156                initialValues = new DoubleArray(new double[] { doubleValue.Value - 0.2, doubleValue.Value - 0.1, doubleValue.Value });
     157              else if (doubleValue.Value < -0.9 || (doubleValue.Value > 0 && doubleValue.Value < 0.1))
     158                initialValues = new DoubleArray(new double[] { doubleValue.Value, doubleValue.Value + 0.1, doubleValue.Value + 0.2 });
     159              else initialValues = new DoubleArray(new double[] { doubleValue.Value - 0.1, doubleValue.Value, doubleValue.Value + 0.1 });
     160            } else initialValues = new DoubleArray(new double[] { doubleValue.Value / 2.0, doubleValue.Value, doubleValue.Value * 2.0 });
     161            doubleParameters.Add(parameter, initialValues);
     162            doubleParameters[parameter].Reset += new EventHandler(ValuesArray_Reset);
     163          } else doubleParameters.Remove(parameter);
     164        }
     165
     166        var boolValue = parameter.Value as ValueTypeValue<bool>;
     167        if (boolValue != null) {
     168          if (e.Item.Checked) boolParameters.Add(parameter);
     169          else boolParameters.Remove(parameter);
     170        }
    170171      }
    171172
  • stable/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj

    r8600 r9532  
    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)
  • stable/HeuristicLab.Visualization.ChartControlsExtensions/3.3/ImageExportDialog.Designer.cs

    r9456 r9532  
    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();
     
    7984      this.heightNumericUD = new System.Windows.Forms.NumericUpDown();
    8085      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();
    8189      this.chartAreaComboBox = new System.Windows.Forms.ComboBox();
    8290      this.togglePreviewCheckBox = new System.Windows.Forms.CheckBox();
     
    8593      this.label8 = new System.Windows.Forms.Label();
    8694      this.previewPictureBox = new System.Windows.Forms.PictureBox();
     95      this.label19 = new System.Windows.Forms.Label();
    8796      this.label13 = new System.Windows.Forms.Label();
     97      this.rawImageSizeLabel = new System.Windows.Forms.Label();
    8898      this.previewZoomLabel = new System.Windows.Forms.Label();
    8999      this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
    90       this.label19 = new System.Windows.Forms.Label();
    91       this.rawImageSizeLabel = new System.Windows.Forms.Label();
     100      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    92101      ((System.ComponentModel.ISupportInitialize)(this.widthNumericUD)).BeginInit();
    93102      this.groupBox1.SuspendLayout();
     
    99108      this.splitContainer.Panel2.SuspendLayout();
    100109      this.splitContainer.SuspendLayout();
     110      this.legendGroupBox.SuspendLayout();
    101111      ((System.ComponentModel.ISupportInitialize)(this.previewPictureBox)).BeginInit();
    102112      this.SuspendLayout();
     
    104114      // titleTextBox
    105115      //
    106       this.titleTextBox.Location = new System.Drawing.Point(62, 11);
     116      this.titleTextBox.Location = new System.Drawing.Point(84, 11);
    107117      this.titleTextBox.Name = "titleTextBox";
    108       this.titleTextBox.Size = new System.Drawing.Size(203, 20);
     118      this.titleTextBox.Size = new System.Drawing.Size(159, 20);
    109119      this.titleTextBox.TabIndex = 1;
     120      this.toolTip.SetToolTip(this.titleTextBox, "The title of the chart, will be removed if set to empty.");
    110121      this.titleTextBox.TextChanged += new System.EventHandler(this.titleTextBox_TextChanged);
    111122      //
     
    123134      this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
    124135      this.okButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    125       this.okButton.Location = new System.Drawing.Point(141, 487);
     136      this.okButton.Location = new System.Drawing.Point(141, 552);
    126137      this.okButton.Name = "okButton";
    127138      this.okButton.Size = new System.Drawing.Size(75, 23);
    128       this.okButton.TabIndex = 13;
     139      this.okButton.TabIndex = 2;
    129140      this.okButton.Text = "Save";
    130141      this.okButton.UseVisualStyleBackColor = true;
     
    134145      //
    135146      this.label2.AutoSize = true;
    136       this.label2.Location = new System.Drawing.Point(10, 14);
     147      this.label2.Location = new System.Drawing.Point(18, 14);
    137148      this.label2.Name = "label2";
    138       this.label2.Size = new System.Drawing.Size(30, 13);
     149      this.label2.Size = new System.Drawing.Size(54, 13);
    139150      this.label2.TabIndex = 0;
    140       this.label2.Text = "Title:";
     151      this.label2.Text = "Title Text:";
    141152      //
    142153      // secondaryXTextBox
    143154      //
    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);
     155      this.secondaryXTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     156            | System.Windows.Forms.AnchorStyles.Right)));
     157      this.secondaryXTextBox.Location = new System.Drawing.Point(72, 27);
    147158      this.secondaryXTextBox.Name = "secondaryXTextBox";
    148       this.secondaryXTextBox.Size = new System.Drawing.Size(203, 20);
     159      this.secondaryXTextBox.Size = new System.Drawing.Size(159, 20);
    149160      this.secondaryXTextBox.TabIndex = 1;
     161      this.toolTip.SetToolTip(this.secondaryXTextBox, "Label of the secondary x-axis");
    150162      this.secondaryXTextBox.TextChanged += new System.EventHandler(this.secondaryXTextBox_TextChanged);
    151163      //
     
    155167      this.label3.Location = new System.Drawing.Point(6, 30);
    156168      this.label3.Name = "label3";
    157       this.label3.Size = new System.Drawing.Size(23, 13);
     169      this.label3.Size = new System.Drawing.Size(46, 13);
    158170      this.label3.TabIndex = 0;
    159       this.label3.Text = "X2:";
     171      this.label3.Text = "X Label:";
    160172      //
    161173      // secondaryYTextBox
    162174      //
    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);
     175      this.secondaryYTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     176            | System.Windows.Forms.AnchorStyles.Right)));
     177      this.secondaryYTextBox.Location = new System.Drawing.Point(72, 53);
    166178      this.secondaryYTextBox.Name = "secondaryYTextBox";
    167       this.secondaryYTextBox.Size = new System.Drawing.Size(203, 20);
    168       this.secondaryYTextBox.TabIndex = 3;
     179      this.secondaryYTextBox.Size = new System.Drawing.Size(159, 20);
     180      this.secondaryYTextBox.TabIndex = 4;
     181      this.toolTip.SetToolTip(this.secondaryYTextBox, "Label of the secondary y-axis");
    169182      this.secondaryYTextBox.TextChanged += new System.EventHandler(this.secondaryYTextBox_TextChanged);
    170183      //
     
    174187      this.label4.Location = new System.Drawing.Point(6, 56);
    175188      this.label4.Name = "label4";
    176       this.label4.Size = new System.Drawing.Size(23, 13);
    177       this.label4.TabIndex = 2;
    178       this.label4.Text = "Y2:";
     189      this.label4.Size = new System.Drawing.Size(46, 13);
     190      this.label4.TabIndex = 3;
     191      this.label4.Text = "Y Label:";
    179192      //
    180193      // resolutionComboBox
     
    185198            "96",
    186199            "150",
    187             "300"});
    188       this.resolutionComboBox.Location = new System.Drawing.Point(76, 383);
     200            "300",
     201            "600",
     202            "800",
     203            "1200"});
     204      this.resolutionComboBox.Location = new System.Drawing.Point(84, 450);
    189205      this.resolutionComboBox.Name = "resolutionComboBox";
    190       this.resolutionComboBox.Size = new System.Drawing.Size(75, 21);
    191       this.resolutionComboBox.TabIndex = 6;
     206      this.resolutionComboBox.Size = new System.Drawing.Size(83, 21);
     207      this.resolutionComboBox.TabIndex = 8;
     208      this.toolTip.SetToolTip(this.resolutionComboBox, "Specify the resolution of the output image, use a minimum of 300dpi if the image " +
     209        "should appear in a publication.");
    192210      this.resolutionComboBox.TextChanged += new System.EventHandler(this.resolutionComboBox_TextChanged);
    193211      this.resolutionComboBox.Validating += new System.ComponentModel.CancelEventHandler(this.resolutionComboBox_Validating);
     
    201219            0,
    202220            65536});
    203       this.widthNumericUD.Location = new System.Drawing.Point(76, 410);
     221      this.widthNumericUD.Location = new System.Drawing.Point(84, 477);
    204222      this.widthNumericUD.Minimum = new decimal(new int[] {
    205223            1,
     
    208226            65536});
    209227      this.widthNumericUD.Name = "widthNumericUD";
    210       this.widthNumericUD.Size = new System.Drawing.Size(75, 20);
    211       this.widthNumericUD.TabIndex = 8;
     228      this.widthNumericUD.Size = new System.Drawing.Size(83, 20);
     229      this.widthNumericUD.TabIndex = 11;
    212230      this.widthNumericUD.Value = new decimal(new int[] {
    213231            8,
     
    220238      //
    221239      this.label5.AutoSize = true;
    222       this.label5.Location = new System.Drawing.Point(10, 386);
     240      this.label5.Location = new System.Drawing.Point(18, 453);
    223241      this.label5.Name = "label5";
    224242      this.label5.Size = new System.Drawing.Size(60, 13);
    225       this.label5.TabIndex = 5;
     243      this.label5.TabIndex = 7;
    226244      this.label5.Text = "Resolution:";
    227245      //
     
    229247      //
    230248      this.label6.AutoSize = true;
    231       this.label6.Location = new System.Drawing.Point(10, 412);
     249      this.label6.Location = new System.Drawing.Point(18, 479);
    232250      this.label6.Name = "label6";
    233251      this.label6.Size = new System.Drawing.Size(38, 13);
    234       this.label6.TabIndex = 7;
     252      this.label6.TabIndex = 10;
    235253      this.label6.Text = "Width:";
    236254      //
    237255      // axisFontSizeComboBox
    238256      //
    239       this.axisFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    240                   | System.Windows.Forms.AnchorStyles.Right)));
     257      this.axisFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     258            | System.Windows.Forms.AnchorStyles.Right)));
    241259      this.axisFontSizeComboBox.FormattingEnabled = true;
    242260      this.axisFontSizeComboBox.Items.AddRange(new object[] {
     
    252270            "36",
    253271            "72"});
    254       this.axisFontSizeComboBox.Location = new System.Drawing.Point(54, 46);
     272      this.axisFontSizeComboBox.Location = new System.Drawing.Point(72, 46);
    255273      this.axisFontSizeComboBox.Name = "axisFontSizeComboBox";
    256       this.axisFontSizeComboBox.Size = new System.Drawing.Size(84, 21);
    257       this.axisFontSizeComboBox.TabIndex = 3;
     274      this.axisFontSizeComboBox.Size = new System.Drawing.Size(159, 21);
     275      this.axisFontSizeComboBox.TabIndex = 4;
     276      this.toolTip.SetToolTip(this.axisFontSizeComboBox, "The font size of the axis labels");
    258277      this.axisFontSizeComboBox.TextChanged += new System.EventHandler(this.axisFontSizeComboBox_TextChanged);
    259278      this.axisFontSizeComboBox.Validating += new System.ComponentModel.CancelEventHandler(this.numericComboBox_Validating);
     
    261280      // scalesFontSizeComboBox
    262281      //
    263       this.scalesFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    264                   | System.Windows.Forms.AnchorStyles.Right)));
     282      this.scalesFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     283            | System.Windows.Forms.AnchorStyles.Right)));
    265284      this.scalesFontSizeComboBox.FormattingEnabled = true;
    266285      this.scalesFontSizeComboBox.Items.AddRange(new object[] {
     
    280299            "36",
    281300            "72"});
    282       this.scalesFontSizeComboBox.Location = new System.Drawing.Point(54, 73);
     301      this.scalesFontSizeComboBox.Location = new System.Drawing.Point(72, 73);
    283302      this.scalesFontSizeComboBox.Name = "scalesFontSizeComboBox";
    284       this.scalesFontSizeComboBox.Size = new System.Drawing.Size(84, 21);
    285       this.scalesFontSizeComboBox.TabIndex = 5;
     303      this.scalesFontSizeComboBox.Size = new System.Drawing.Size(159, 21);
     304      this.scalesFontSizeComboBox.TabIndex = 7;
     305      this.toolTip.SetToolTip(this.scalesFontSizeComboBox, "The font size of the scales");
    286306      this.scalesFontSizeComboBox.TextChanged += new System.EventHandler(this.scalesFontSizeComboBox_TextChanged);
    287307      this.scalesFontSizeComboBox.Validating += new System.ComponentModel.CancelEventHandler(this.numericComboBox_Validating);
     
    290310      //
    291311      this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
    292       this.cancelButton.Location = new System.Drawing.Point(222, 487);
     312      this.cancelButton.Location = new System.Drawing.Point(222, 552);
    293313      this.cancelButton.Name = "cancelButton";
    294314      this.cancelButton.Size = new System.Drawing.Size(75, 23);
    295       this.cancelButton.TabIndex = 14;
     315      this.cancelButton.TabIndex = 0;
    296316      this.cancelButton.Text = "Cancel";
    297317      this.cancelButton.UseVisualStyleBackColor = true;
     
    301321      //
    302322      this.label9.AutoSize = true;
    303       this.label9.Location = new System.Drawing.Point(6, 51);
     323      this.label9.Location = new System.Drawing.Point(6, 49);
    304324      this.label9.Name = "label9";
    305325      this.label9.Size = new System.Drawing.Size(29, 13);
    306       this.label9.TabIndex = 2;
     326      this.label9.TabIndex = 3;
    307327      this.label9.Text = "Axis:";
    308328      //
     
    313333      this.label10.Name = "label10";
    314334      this.label10.Size = new System.Drawing.Size(42, 13);
    315       this.label10.TabIndex = 4;
     335      this.label10.TabIndex = 6;
    316336      this.label10.Text = "Scales:";
    317337      //
    318338      // groupBox1
    319339      //
     340      this.groupBox1.Controls.Add(this.showSecondaryYAxisCheckBox);
     341      this.groupBox1.Controls.Add(this.showSecondaryXAxisCheckBox);
    320342      this.groupBox1.Controls.Add(this.secondaryXTextBox);
    321343      this.groupBox1.Controls.Add(this.secondaryYTextBox);
    322344      this.groupBox1.Controls.Add(this.label4);
    323345      this.groupBox1.Controls.Add(this.label3);
    324       this.groupBox1.Location = new System.Drawing.Point(12, 154);
     346      this.groupBox1.Location = new System.Drawing.Point(12, 221);
    325347      this.groupBox1.Name = "groupBox1";
    326348      this.groupBox1.Size = new System.Drawing.Size(258, 82);
    327       this.groupBox1.TabIndex = 3;
     349      this.groupBox1.TabIndex = 5;
    328350      this.groupBox1.TabStop = false;
    329351      this.groupBox1.Text = "Secondary Axis";
    330352      //
     353      // showSecondaryYAxisCheckBox
     354      //
     355      this.showSecondaryYAxisCheckBox.AutoSize = true;
     356      this.showSecondaryYAxisCheckBox.Location = new System.Drawing.Point(237, 56);
     357      this.showSecondaryYAxisCheckBox.Name = "showSecondaryYAxisCheckBox";
     358      this.showSecondaryYAxisCheckBox.Size = new System.Drawing.Size(15, 14);
     359      this.showSecondaryYAxisCheckBox.TabIndex = 5;
     360      this.toolTip.SetToolTip(this.showSecondaryYAxisCheckBox, "Display");
     361      this.showSecondaryYAxisCheckBox.UseVisualStyleBackColor = true;
     362      this.showSecondaryYAxisCheckBox.CheckedChanged += new System.EventHandler(this.showSecondaryYAxisCheckBox_CheckedChanged);
     363      //
     364      // showSecondaryXAxisCheckBox
     365      //
     366      this.showSecondaryXAxisCheckBox.AutoSize = true;
     367      this.showSecondaryXAxisCheckBox.Location = new System.Drawing.Point(237, 30);
     368      this.showSecondaryXAxisCheckBox.Name = "showSecondaryXAxisCheckBox";
     369      this.showSecondaryXAxisCheckBox.Size = new System.Drawing.Size(15, 14);
     370      this.showSecondaryXAxisCheckBox.TabIndex = 2;
     371      this.toolTip.SetToolTip(this.showSecondaryXAxisCheckBox, "Display");
     372      this.showSecondaryXAxisCheckBox.UseVisualStyleBackColor = true;
     373      this.showSecondaryXAxisCheckBox.CheckedChanged += new System.EventHandler(this.showSecondaryXAxisCheckBox_CheckedChanged);
     374      //
    331375      // groupBox2
    332376      //
     377      this.groupBox2.Controls.Add(this.showPrimaryYAxisCheckBox);
     378      this.groupBox2.Controls.Add(this.showPrimaryXAxisCheckBox);
    333379      this.groupBox2.Controls.Add(this.primaryXTextBox);
    334380      this.groupBox2.Controls.Add(this.primaryYTextBox);
    335381      this.groupBox2.Controls.Add(this.label14);
    336382      this.groupBox2.Controls.Add(this.label15);
    337       this.groupBox2.Location = new System.Drawing.Point(12, 64);
     383      this.groupBox2.Location = new System.Drawing.Point(12, 131);
    338384      this.groupBox2.Name = "groupBox2";
    339385      this.groupBox2.Size = new System.Drawing.Size(258, 84);
    340       this.groupBox2.TabIndex = 2;
     386      this.groupBox2.TabIndex = 4;
    341387      this.groupBox2.TabStop = false;
    342388      this.groupBox2.Text = "Primary Axis";
    343389      //
     390      // showPrimaryYAxisCheckBox
     391      //
     392      this.showPrimaryYAxisCheckBox.AutoSize = true;
     393      this.showPrimaryYAxisCheckBox.Location = new System.Drawing.Point(237, 56);
     394      this.showPrimaryYAxisCheckBox.Name = "showPrimaryYAxisCheckBox";
     395      this.showPrimaryYAxisCheckBox.Size = new System.Drawing.Size(15, 14);
     396      this.showPrimaryYAxisCheckBox.TabIndex = 5;
     397      this.toolTip.SetToolTip(this.showPrimaryYAxisCheckBox, "Display");
     398      this.showPrimaryYAxisCheckBox.UseVisualStyleBackColor = true;
     399      this.showPrimaryYAxisCheckBox.CheckedChanged += new System.EventHandler(this.showPrimaryYAxisCheckBox_CheckedChanged);
     400      //
     401      // showPrimaryXAxisCheckBox
     402      //
     403      this.showPrimaryXAxisCheckBox.AutoSize = true;
     404      this.showPrimaryXAxisCheckBox.Location = new System.Drawing.Point(237, 30);
     405      this.showPrimaryXAxisCheckBox.Name = "showPrimaryXAxisCheckBox";
     406      this.showPrimaryXAxisCheckBox.Size = new System.Drawing.Size(15, 14);
     407      this.showPrimaryXAxisCheckBox.TabIndex = 2;
     408      this.toolTip.SetToolTip(this.showPrimaryXAxisCheckBox, "Display");
     409      this.showPrimaryXAxisCheckBox.UseVisualStyleBackColor = true;
     410      this.showPrimaryXAxisCheckBox.CheckedChanged += new System.EventHandler(this.showPrimaryXAxisCheckBox_CheckedChanged);
     411      //
    344412      // primaryXTextBox
    345413      //
    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);
     414      this.primaryXTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     415            | System.Windows.Forms.AnchorStyles.Right)));
     416      this.primaryXTextBox.Location = new System.Drawing.Point(72, 27);
    349417      this.primaryXTextBox.Name = "primaryXTextBox";
    350       this.primaryXTextBox.Size = new System.Drawing.Size(203, 20);
     418      this.primaryXTextBox.Size = new System.Drawing.Size(159, 20);
    351419      this.primaryXTextBox.TabIndex = 1;
     420      this.toolTip.SetToolTip(this.primaryXTextBox, "Label of the primary x-axis");
    352421      this.primaryXTextBox.TextChanged += new System.EventHandler(this.primaryXTextBox_TextChanged);
    353422      //
    354423      // primaryYTextBox
    355424      //
    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);
     425      this.primaryYTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     426            | System.Windows.Forms.AnchorStyles.Right)));
     427      this.primaryYTextBox.Location = new System.Drawing.Point(72, 53);
    359428      this.primaryYTextBox.Name = "primaryYTextBox";
    360       this.primaryYTextBox.Size = new System.Drawing.Size(203, 20);
    361       this.primaryYTextBox.TabIndex = 3;
     429      this.primaryYTextBox.Size = new System.Drawing.Size(159, 20);
     430      this.primaryYTextBox.TabIndex = 4;
     431      this.toolTip.SetToolTip(this.primaryYTextBox, "Label of the primary y-axis");
    362432      this.primaryYTextBox.TextChanged += new System.EventHandler(this.primaryYTextBox_TextChanged);
    363433      //
     
    367437      this.label14.Location = new System.Drawing.Point(6, 56);
    368438      this.label14.Name = "label14";
    369       this.label14.Size = new System.Drawing.Size(17, 13);
    370       this.label14.TabIndex = 2;
    371       this.label14.Text = "Y:";
     439      this.label14.Size = new System.Drawing.Size(46, 13);
     440      this.label14.TabIndex = 3;
     441      this.label14.Text = "Y Label:";
    372442      //
    373443      // label15
     
    376446      this.label15.Location = new System.Drawing.Point(6, 30);
    377447      this.label15.Name = "label15";
    378       this.label15.Size = new System.Drawing.Size(17, 13);
     448      this.label15.Size = new System.Drawing.Size(46, 13);
    379449      this.label15.TabIndex = 0;
    380       this.label15.Text = "X:";
     450      this.label15.Text = "X Label:";
    381451      //
    382452      // groupBox3
     
    394464      this.groupBox3.Controls.Add(this.axisFontSizeComboBox);
    395465      this.groupBox3.Controls.Add(this.titleFontSizeComboBox);
    396       this.groupBox3.Location = new System.Drawing.Point(12, 242);
     466      this.groupBox3.Location = new System.Drawing.Point(12, 309);
    397467      this.groupBox3.Name = "groupBox3";
    398468      this.groupBox3.Size = new System.Drawing.Size(258, 131);
    399       this.groupBox3.TabIndex = 4;
     469      this.groupBox3.TabIndex = 6;
    400470      this.groupBox3.TabStop = false;
    401471      this.groupBox3.Text = "Font Size";
     
    404474      //
    405475      this.label18.AutoSize = true;
    406       this.label18.Location = new System.Drawing.Point(144, 105);
     476      this.label18.Location = new System.Drawing.Point(234, 105);
    407477      this.label18.Name = "label18";
    408478      this.label18.Size = new System.Drawing.Size(16, 13);
    409       this.label18.TabIndex = 0;
     479      this.label18.TabIndex = 11;
    410480      this.label18.Text = "pt";
    411481      //
     
    413483      //
    414484      this.label12.AutoSize = true;
    415       this.label12.Location = new System.Drawing.Point(144, 78);
     485      this.label12.Location = new System.Drawing.Point(234, 78);
    416486      this.label12.Name = "label12";
    417487      this.label12.Size = new System.Drawing.Size(16, 13);
    418       this.label12.TabIndex = 0;
     488      this.label12.TabIndex = 8;
    419489      this.label12.Text = "pt";
    420490      //
     
    422492      //
    423493      this.label11.AutoSize = true;
    424       this.label11.Location = new System.Drawing.Point(144, 51);
     494      this.label11.Location = new System.Drawing.Point(234, 49);
    425495      this.label11.Name = "label11";
    426496      this.label11.Size = new System.Drawing.Size(16, 13);
    427       this.label11.TabIndex = 0;
     497      this.label11.TabIndex = 5;
    428498      this.label11.Text = "pt";
    429499      //
     
    431501      //
    432502      this.label7.AutoSize = true;
    433       this.label7.Location = new System.Drawing.Point(144, 22);
     503      this.label7.Location = new System.Drawing.Point(234, 22);
    434504      this.label7.Name = "label7";
    435505      this.label7.Size = new System.Drawing.Size(16, 13);
    436       this.label7.TabIndex = 0;
     506      this.label7.TabIndex = 2;
    437507      this.label7.Text = "pt";
    438508      //
    439509      // legendFontSizeComboBox
    440510      //
    441       this.legendFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    442                   | System.Windows.Forms.AnchorStyles.Right)));
     511      this.legendFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     512            | System.Windows.Forms.AnchorStyles.Right)));
    443513      this.legendFontSizeComboBox.FormattingEnabled = true;
    444514      this.legendFontSizeComboBox.Items.AddRange(new object[] {
     
    458528            "36",
    459529            "72"});
    460       this.legendFontSizeComboBox.Location = new System.Drawing.Point(54, 100);
     530      this.legendFontSizeComboBox.Location = new System.Drawing.Point(72, 100);
    461531      this.legendFontSizeComboBox.Name = "legendFontSizeComboBox";
    462       this.legendFontSizeComboBox.Size = new System.Drawing.Size(84, 21);
    463       this.legendFontSizeComboBox.TabIndex = 5;
     532      this.legendFontSizeComboBox.Size = new System.Drawing.Size(159, 21);
     533      this.legendFontSizeComboBox.TabIndex = 10;
     534      this.toolTip.SetToolTip(this.legendFontSizeComboBox, "The font size of the legend text");
    464535      this.legendFontSizeComboBox.TextChanged += new System.EventHandler(this.legendFontSizeComboBox_TextChanged);
    465536      this.legendFontSizeComboBox.Validating += new System.ComponentModel.CancelEventHandler(this.numericComboBox_Validating);
     
    471542      this.label17.Name = "label17";
    472543      this.label17.Size = new System.Drawing.Size(46, 13);
    473       this.label17.TabIndex = 4;
     544      this.label17.TabIndex = 9;
    474545      this.label17.Text = "Legend:";
    475546      //
    476547      // titleFontSizeComboBox
    477548      //
    478       this.titleFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    479                   | System.Windows.Forms.AnchorStyles.Right)));
     549      this.titleFontSizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     550            | System.Windows.Forms.AnchorStyles.Right)));
    480551      this.titleFontSizeComboBox.FormattingEnabled = true;
    481552      this.titleFontSizeComboBox.Items.AddRange(new object[] {
     
    491562            "36",
    492563            "72"});
    493       this.titleFontSizeComboBox.Location = new System.Drawing.Point(54, 19);
     564      this.titleFontSizeComboBox.Location = new System.Drawing.Point(72, 19);
    494565      this.titleFontSizeComboBox.Name = "titleFontSizeComboBox";
    495       this.titleFontSizeComboBox.Size = new System.Drawing.Size(84, 21);
     566      this.titleFontSizeComboBox.Size = new System.Drawing.Size(159, 21);
    496567      this.titleFontSizeComboBox.TabIndex = 1;
     568      this.toolTip.SetToolTip(this.titleFontSizeComboBox, "The font size of the title text");
    497569      this.titleFontSizeComboBox.TextChanged += new System.EventHandler(this.titleFontSizeComboBox_TextChanged);
    498570      this.titleFontSizeComboBox.Validating += new System.ComponentModel.CancelEventHandler(this.numericComboBox_Validating);
     
    501573      //
    502574      this.label16.AutoSize = true;
    503       this.label16.Location = new System.Drawing.Point(10, 438);
     575      this.label16.Location = new System.Drawing.Point(18, 505);
    504576      this.label16.Name = "label16";
    505577      this.label16.Size = new System.Drawing.Size(41, 13);
    506       this.label16.TabIndex = 10;
     578      this.label16.TabIndex = 12;
    507579      this.label16.Text = "Height:";
    508580      //
     
    515587            0,
    516588            65536});
    517       this.heightNumericUD.Location = new System.Drawing.Point(76, 436);
     589      this.heightNumericUD.Location = new System.Drawing.Point(84, 503);
    518590      this.heightNumericUD.Minimum = new decimal(new int[] {
    519591            1,
     
    522594            65536});
    523595      this.heightNumericUD.Name = "heightNumericUD";
    524       this.heightNumericUD.Size = new System.Drawing.Size(75, 20);
    525       this.heightNumericUD.TabIndex = 11;
     596      this.heightNumericUD.Size = new System.Drawing.Size(83, 20);
     597      this.heightNumericUD.TabIndex = 13;
    526598      this.heightNumericUD.Value = new decimal(new int[] {
    527             8,
     599            6,
    528600            0,
    529601            0,
     
    540612      // splitContainer.Panel1
    541613      //
     614      this.splitContainer.Panel1.Controls.Add(this.legendGroupBox);
    542615      this.splitContainer.Panel1.Controls.Add(this.chartAreaComboBox);
    543616      this.splitContainer.Panel1.Controls.Add(this.togglePreviewCheckBox);
     
    564637      this.splitContainer.Panel2.Controls.Add(this.rawImageSizeLabel);
    565638      this.splitContainer.Panel2.Controls.Add(this.previewZoomLabel);
    566       this.splitContainer.Size = new System.Drawing.Size(793, 478);
     639      this.splitContainer.Size = new System.Drawing.Size(793, 542);
    567640      this.splitContainer.SplitterDistance = 300;
    568641      this.splitContainer.SplitterWidth = 1;
    569       this.splitContainer.TabIndex = 15;
     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);
    570679      //
    571680      // chartAreaComboBox
     
    573682      this.chartAreaComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    574683      this.chartAreaComboBox.FormattingEnabled = true;
    575       this.chartAreaComboBox.Location = new System.Drawing.Point(76, 37);
     684      this.chartAreaComboBox.Location = new System.Drawing.Point(84, 37);
    576685      this.chartAreaComboBox.Name = "chartAreaComboBox";
    577       this.chartAreaComboBox.Size = new System.Drawing.Size(189, 21);
    578       this.chartAreaComboBox.TabIndex = 17;
     686      this.chartAreaComboBox.Size = new System.Drawing.Size(159, 21);
     687      this.chartAreaComboBox.TabIndex = 3;
     688      this.toolTip.SetToolTip(this.chartAreaComboBox, "Select the chart area in case there are multiple.");
    579689      this.chartAreaComboBox.SelectedIndexChanged += new System.EventHandler(this.chartAreaComboBox_SelectedIndexChanged);
    580690      //
    581691      // togglePreviewCheckBox
    582692      //
    583       this.togglePreviewCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    584                   | System.Windows.Forms.AnchorStyles.Left)));
     693      this.togglePreviewCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     694            | System.Windows.Forms.AnchorStyles.Left)));
    585695      this.togglePreviewCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
    586696      this.togglePreviewCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
    587697      this.togglePreviewCheckBox.Location = new System.Drawing.Point(277, 3);
    588698      this.togglePreviewCheckBox.Name = "togglePreviewCheckBox";
    589       this.togglePreviewCheckBox.Size = new System.Drawing.Size(20, 472);
     699      this.togglePreviewCheckBox.Size = new System.Drawing.Size(20, 536);
    590700      this.togglePreviewCheckBox.TabIndex = 16;
    591701      this.togglePreviewCheckBox.Text = ">";
     702      this.toolTip.SetToolTip(this.togglePreviewCheckBox, "Show or hide the preview pane");
    592703      this.togglePreviewCheckBox.UseVisualStyleBackColor = true;
    593704      this.togglePreviewCheckBox.CheckedChanged += new System.EventHandler(this.togglePreviewCheckBox_CheckedChanged);
     
    597708      this.lengthUnitComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    598709      this.lengthUnitComboBox.FormattingEnabled = true;
    599       this.lengthUnitComboBox.Location = new System.Drawing.Point(157, 422);
     710      this.lengthUnitComboBox.Location = new System.Drawing.Point(173, 489);
    600711      this.lengthUnitComboBox.Name = "lengthUnitComboBox";
    601       this.lengthUnitComboBox.Size = new System.Drawing.Size(108, 21);
    602       this.lengthUnitComboBox.TabIndex = 6;
     712      this.lengthUnitComboBox.Size = new System.Drawing.Size(70, 21);
     713      this.lengthUnitComboBox.TabIndex = 14;
    603714      this.lengthUnitComboBox.SelectedIndexChanged += new System.EventHandler(this.lengthUnitComboBox_SelectedIndexChanged);
    604715      //
     
    607718      this.resolutionUnitComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    608719      this.resolutionUnitComboBox.FormattingEnabled = true;
    609       this.resolutionUnitComboBox.Location = new System.Drawing.Point(157, 383);
     720      this.resolutionUnitComboBox.Location = new System.Drawing.Point(173, 450);
    610721      this.resolutionUnitComboBox.Name = "resolutionUnitComboBox";
    611       this.resolutionUnitComboBox.Size = new System.Drawing.Size(108, 21);
    612       this.resolutionUnitComboBox.TabIndex = 6;
     722      this.resolutionUnitComboBox.Size = new System.Drawing.Size(70, 21);
     723      this.resolutionUnitComboBox.TabIndex = 9;
    613724      this.resolutionUnitComboBox.SelectedIndexChanged += new System.EventHandler(this.resolutionUnitComboBox_SelectedIndexChanged);
    614725      //
     
    616727      //
    617728      this.label8.AutoSize = true;
    618       this.label8.Location = new System.Drawing.Point(10, 40);
     729      this.label8.Location = new System.Drawing.Point(18, 40);
    619730      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:";
     731      this.label8.Size = new System.Drawing.Size(32, 13);
     732      this.label8.TabIndex = 2;
     733      this.label8.Text = "Area:";
    623734      //
    624735      // previewPictureBox
     
    626737      this.previewPictureBox.Location = new System.Drawing.Point(0, 3);
    627738      this.previewPictureBox.Name = "previewPictureBox";
    628       this.previewPictureBox.Size = new System.Drawing.Size(492, 453);
     739      this.previewPictureBox.Size = new System.Drawing.Size(492, 520);
    629740      this.previewPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
    630741      this.previewPictureBox.TabIndex = 0;
    631742      this.previewPictureBox.TabStop = false;
    632743      //
     744      // label19
     745      //
     746      this.label19.AutoSize = true;
     747      this.label19.Location = new System.Drawing.Point(84, 526);
     748      this.label19.Name = "label19";
     749      this.label19.Size = new System.Drawing.Size(84, 13);
     750      this.label19.TabIndex = 10;
     751      this.label19.Text = "Raw image size:";
     752      //
    633753      // label13
    634754      //
    635755      this.label13.AutoSize = true;
    636       this.label13.Location = new System.Drawing.Point(3, 459);
     756      this.label13.Location = new System.Drawing.Point(2, 526);
    637757      this.label13.Name = "label13";
    638758      this.label13.Size = new System.Drawing.Size(37, 13);
     
    640760      this.label13.Text = "Zoom:";
    641761      //
     762      // rawImageSizeLabel
     763      //
     764      this.rawImageSizeLabel.AutoSize = true;
     765      this.rawImageSizeLabel.Location = new System.Drawing.Point(174, 526);
     766      this.rawImageSizeLabel.Name = "rawImageSizeLabel";
     767      this.rawImageSizeLabel.Size = new System.Drawing.Size(37, 13);
     768      this.rawImageSizeLabel.TabIndex = 10;
     769      this.rawImageSizeLabel.Text = "0.00M";
     770      //
    642771      // previewZoomLabel
    643772      //
    644773      this.previewZoomLabel.AutoSize = true;
    645       this.previewZoomLabel.Location = new System.Drawing.Point(46, 459);
     774      this.previewZoomLabel.Location = new System.Drawing.Point(45, 526);
    646775      this.previewZoomLabel.Name = "previewZoomLabel";
    647776      this.previewZoomLabel.Size = new System.Drawing.Size(33, 13);
     
    652781      //
    653782      this.saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|EMF (*.emf)|*.emf|PNG (*.png)|*.png|GIF (" +
    654           "*.gif)|*.gif|TIFF (*.tif)|*.tif\"";
     783    "*.gif)|*.gif|TIFF (*.tif)|*.tif\"";
    655784      this.saveFileDialog.FilterIndex = 2;
    656785      //
    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       //
    675786      // ImageExportDialog
    676787      //
    677788      this.AcceptButton = this.okButton;
    678       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    679789      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    680790      this.CancelButton = this.cancelButton;
    681       this.ClientSize = new System.Drawing.Size(794, 522);
     791      this.ClientSize = new System.Drawing.Size(794, 587);
    682792      this.ControlBox = false;
    683793      this.Controls.Add(this.splitContainer);
     
    703813      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
    704814      this.splitContainer.ResumeLayout(false);
     815      this.legendGroupBox.ResumeLayout(false);
     816      this.legendGroupBox.PerformLayout();
    705817      ((System.ComponentModel.ISupportInitialize)(this.previewPictureBox)).EndInit();
    706818      this.ResumeLayout(false);
     
    755867    private System.Windows.Forms.Label label19;
    756868    private System.Windows.Forms.Label rawImageSizeLabel;
     869    private System.Windows.Forms.CheckBox showSecondaryYAxisCheckBox;
     870    private System.Windows.Forms.CheckBox showSecondaryXAxisCheckBox;
     871    private System.Windows.Forms.CheckBox showPrimaryYAxisCheckBox;
     872    private System.Windows.Forms.CheckBox showPrimaryXAxisCheckBox;
     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;
    757877  }
    758878}
  • stable/HeuristicLab.Visualization.ChartControlsExtensions/3.3/ImageExportDialog.cs

    r9456 r9532  
    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 = 625;
    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       originalChart.Serializer.Save(ms);
    159 
    160       ms.Seek(0, SeekOrigin.Begin);
    161       workingChart = new EnhancedChart();
    162       workingChart.Serializer.Format = originalChart.Serializer.Format;
    163       workingChart.Serializer.Load(ms);
    164       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;
    165169
    166170      originalChart.Serializer.Content = prevContent;
     
    169173
    170174      chartAreaComboBox.Items.Clear();
    171       foreach (ChartArea area in originalChart.ChartAreas) {
     175      foreach (var area in originalChart.ChartAreas) {
    172176        chartAreaComboBox.Items.Add(area.Name);
    173177      }
    174178      chartAreaComboBox.SelectedIndex = 0;
     179      SuppressEvents = true;
     180      try {
     181        showPrimaryXAxisCheckBox.Checked = originalChart.Series.Any(x => x.XAxisType == AxisType.Primary);
     182        showPrimaryYAxisCheckBox.Checked = originalChart.Series.Any(x => x.YAxisType == AxisType.Primary);
     183        showSecondaryXAxisCheckBox.Checked = originalChart.Series.Any(x => x.XAxisType == AxisType.Secondary);
     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        }
     211      } finally { SuppressEvents = false; }
    175212      base.OnShown(e);
    176213
     
    193230    }
    194231
     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      }
     259    }
     260
    195261    private void titleTextBox_TextChanged(object sender, EventArgs e) {
    196262      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);
     263        if (string.IsNullOrEmpty(titleTextBox.Text))
     264          workingChart.Titles.Clear();
     265        else {
     266          if (workingChart.Titles.Count > 0) {
     267            workingChart.Titles[0].Text = titleTextBox.Text;
     268          } else {
     269            var t = new Title(titleTextBox.Text);
     270            t.Font = ChangeFontSizePt(t.Font, float.Parse(titleFontSizeComboBox.Text));
     271            workingChart.Titles.Add(t);
     272          }
    203273        }
    204274        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    208278    private void primaryXTextBox_TextChanged(object sender, EventArgs e) {
    209279      if (!SuppressEvents) {
    210         ChartArea area = GetCurrentChartArea();
     280        var area = GetCurrentChartArea();
    211281        area.AxisX.Title = primaryXTextBox.Text;
    212282        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    216286    private void primaryYTextBox_TextChanged(object sender, EventArgs e) {
    217287      if (!SuppressEvents) {
    218         ChartArea area = GetCurrentChartArea();
     288        var area = GetCurrentChartArea();
    219289        area.AxisY.Title = primaryYTextBox.Text;
    220290        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    224294    private void secondaryXTextBox_TextChanged(object sender, EventArgs e) {
    225295      if (!SuppressEvents) {
    226         ChartArea area = GetCurrentChartArea();
     296        var area = GetCurrentChartArea();
    227297        area.AxisX2.Title = secondaryXTextBox.Text;
    228298        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    232302    private void secondaryYTextBox_TextChanged(object sender, EventArgs e) {
    233303      if (!SuppressEvents) {
    234         ChartArea area = GetCurrentChartArea();
     304        var area = GetCurrentChartArea();
    235305        area.AxisY2.Title = secondaryYTextBox.Text;
     306        if (togglePreviewCheckBox.Checked) UpdatePreview();
     307      }
     308    }
     309
     310    private void showPrimaryXAxisCheckBox_CheckedChanged(object sender, EventArgs e) {
     311      if (!SuppressEvents) {
     312        var area = GetCurrentChartArea();
     313        var isChecked = ((CheckBox)sender).Checked;
     314        area.AxisX.Enabled = isChecked ? AxisEnabled.True : AxisEnabled.False;
     315        if (togglePreviewCheckBox.Checked) UpdatePreview();
     316      }
     317    }
     318
     319    private void showPrimaryYAxisCheckBox_CheckedChanged(object sender, EventArgs e) {
     320      if (!SuppressEvents) {
     321        var area = GetCurrentChartArea();
     322        var isChecked = ((CheckBox)sender).Checked;
     323        area.AxisY.Enabled = isChecked ? AxisEnabled.True : AxisEnabled.False;
     324        if (togglePreviewCheckBox.Checked) UpdatePreview();
     325      }
     326    }
     327
     328    private void showSecondaryXAxisCheckBox_CheckedChanged(object sender, EventArgs e) {
     329      if (!SuppressEvents) {
     330        var area = GetCurrentChartArea();
     331        var isChecked = ((CheckBox)sender).Checked;
     332        area.AxisX2.Enabled = isChecked ? AxisEnabled.True : AxisEnabled.False;
     333        if (togglePreviewCheckBox.Checked) UpdatePreview();
     334      }
     335    }
     336
     337    private void showSecondaryYAxisCheckBox_CheckedChanged(object sender, EventArgs e) {
     338      if (!SuppressEvents) {
     339        var area = GetCurrentChartArea();
     340        var isChecked = ((CheckBox)sender).Checked;
     341        area.AxisY2.Enabled = isChecked ? AxisEnabled.True : AxisEnabled.False;
    236342        if (togglePreviewCheckBox.Checked) UpdatePreview();
    237343      }
     
    270376        float fontSize;
    271377        if (float.TryParse(axisFontSizeComboBox.Text, out fontSize)) {
    272           ChartArea area = GetCurrentChartArea();
    273           foreach (Axis a in area.Axes) {
     378          var area = GetCurrentChartArea();
     379          foreach (Axis a in area.Axes)
    274380            a.TitleFont = ChangeFontSizePt(a.TitleFont, fontSize);
    275           }
    276381        }
    277382        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    283388        float fontSize;
    284389        if (float.TryParse(scalesFontSizeComboBox.Text, out fontSize)) {
    285           ChartArea area = GetCurrentChartArea();
    286           foreach (Axis a in area.Axes) {
     390          var area = GetCurrentChartArea();
     391          foreach (var a in area.Axes)
    287392            a.LabelStyle.Font = ChangeFontSizePt(a.LabelStyle.Font, fontSize);
    288           }
    289393        }
    290394        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    296400        float fontSize;
    297401        if (float.TryParse(legendFontSizeComboBox.Text, out fontSize)) {
    298           foreach (Legend l in workingChart.Legends) {
     402          foreach (var l in workingChart.Legends)
    299403            l.Font = ChangeFontSizePt(l.Font, fontSize);
    300           }
    301404        }
    302405        if (togglePreviewCheckBox.Checked) UpdatePreview();
     
    336439      GetImageParameters(out dpi, out width, out height);
    337440
    338       Bitmap image = new Bitmap((int)Math.Round(width), (int)Math.Round(height));
     441      var image = new Bitmap((int)Math.Round(width), (int)Math.Round(height));
    339442      image.SetResolution(dpi, dpi);
    340       using (Graphics graphics = Graphics.FromImage(image)) {
     443      using (var graphics = Graphics.FromImage(image)) {
    341444        workingChart.Printing.PrintPaint(graphics, new Rectangle(0, 0, image.Width, image.Height));
    342445      }
     
    344447      if (titleTextBox.Text.Trim() != String.Empty) saveFileDialog.FileName = titleTextBox.Text.Trim();
    345448      if (saveFileDialog.ShowDialog() == DialogResult.OK) {
    346         ImageFormat format = ImageFormat.Bmp;
    347         string filename = saveFileDialog.FileName.ToLower();
     449        var format = ImageFormat.Bmp;
     450        var filename = saveFileDialog.FileName.ToLower();
    348451        if (filename.EndsWith("jpg")) {
    349452          format = ImageFormat.Jpeg;
Note: See TracChangeset for help on using the changeset viewer.