Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/18/11 17:33:13 (13 years ago)
Author:
abeham
Message:

#1465

  • Fixed some bugs
  • Fixed out-of-sync issue in DataRowVisualPropertiesControl
  • Added border in histogram (white for very dark colors)
  • Added serializer for System.Drawing.Font
  • Added option to choose the font of the title as well as the axis of the chart
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/histogram/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesControl.cs

    r6014 r6020  
    2020#endregion
    2121
     22using System.Drawing;
    2223using System.Windows.Forms;
    2324using HeuristicLab.MainForm;
     
    4748      try {
    4849        if (Content == null) {
     50          titleFontLabel.Text = "(  )";
     51          axisFontLabel.Text = "(  )";
     52
    4953          xAxisPrimaryTitleTextBox.Text = string.Empty;
    5054          xAxisPrimaryMinimumAutoRadioButton.Checked = false;
     
    7781          yAxisSecondaryMaximumFixedTextBox.Text = string.Empty;
    7882        } else {
     83          titleFontLabel.Text = "( " + FormatFont(Content.TitleFont) + " )";
     84          axisFontLabel.Text = "( " + FormatFont(Content.AxisTitleFont) + " )";
     85
    7986          xAxisPrimaryTitleTextBox.Text = Content.XAxisTitle;
    8087          xAxisPrimaryMinimumAutoRadioButton.Checked = Content.XAxisMinimumAuto;
     
    348355      }
    349356    }
     357
     358    private void titleFontButton_Click(object sender, System.EventArgs e) {
     359      titleFontDialog.Font = Content.TitleFont;
     360      titleFontDialog.Color = Content.TitleColor;
     361      if (titleFontDialog.ShowDialog() == DialogResult.OK) {
     362        Content.TitleFont = titleFontDialog.Font;
     363        Content.TitleColor = titleFontDialog.Color;
     364        titleFontLabel.Text = "( " + FormatFont(Content.TitleFont) + " )";
     365      }
     366    }
     367
     368    private void axisFontButton_Click(object sender, System.EventArgs e) {
     369      axisFontDialog.Font = Content.AxisTitleFont;
     370      axisFontDialog.Color = Content.AxisTitleColor;
     371      if (axisFontDialog.ShowDialog() == DialogResult.OK) {
     372        Content.AxisTitleFont = axisFontDialog.Font;
     373        Content.AxisTitleColor = axisFontDialog.Color;
     374        axisFontLabel.Text = "( " + FormatFont(Content.AxisTitleFont) + " )";
     375      }
     376    }
    350377    #endregion
     378
     379    private string FormatFont(Font f) {
     380      if (f == null) return string.Empty;
     381      else return f.Name + ", " + f.SizeInPoints.ToString() + "pt, " + f.Style.ToString();
     382    }
    351383  }
    352384}
Note: See TracChangeset for help on using the changeset viewer.