namespace OINA.Extender.WPF.Testharness
{
using System.Windows;
using System.Windows.Media;
using OINA.Extender.Controls.Styles;
///
/// Interaction logic for PeriodicTableVisualSettings.xaml
///
public partial class PeriodicTableVisualSettings : Window
{
///
/// Gets or sets the color of the background.
///
///
/// The color of the background.
///
public Color BackgroundColor
{
get { return PeriodicTableStyle.BackgroundColor; }
set { PeriodicTableStyle.BackgroundColor = value; }
}
///
/// Gets or sets the color of the included element.
///
///
/// The color of the included element.
///
public Color IncludedElementColor
{
get { return PeriodicTableStyle.ElementIncludeBackgroundColor; }
set { PeriodicTableStyle.ElementIncludeBackgroundColor = value; }
}
///
/// Gets or sets the color of the excluded element.
///
///
/// The color of the excluded element.
///
public Color ExcludedElementColor
{
get { return PeriodicTableStyle.ElementExcludeBackgroundColor; }
set { PeriodicTableStyle.ElementExcludeBackgroundColor = value; }
}
///
/// Gets or sets the color of the idle element.
///
///
/// The color of the idle element.
///
public Color IdleElementColor
{
get
{
return PeriodicTableStyle.ElementIdleBackgroundColor;
}
set
{
PeriodicTableStyle.ElementIdleBackgroundColor = value;
}
}
///
/// Gets or sets the color of the element highlight.
///
///
/// The color of the element highlight.
///
public Color ElementHighlightColor
{
get
{
return PeriodicTableStyle.ElementHighlightColor;
}
set
{
PeriodicTableStyle.ElementHighlightColor = value;
}
}
///
/// Gets or sets the color of the element border.
///
///
/// The color of the element border.
///
public Color ElementBorderColor
{
get
{
return PeriodicTableStyle.ElementBorderColor;
}
set
{
PeriodicTableStyle.ElementBorderColor = value;
}
}
///
/// Gets or sets the periodic table font family.
///
///
/// The periodic table font family.
///
public FontFamily PeriodicTableFontFamily
{
get
{
return PeriodicTableStyle.PeriodicTableFontFamily;
}
set
{
PeriodicTableStyle.PeriodicTableFontFamily = value;
}
}
///
/// Gets or sets the periodic table font style.
///
///
/// The periodic table font style.
///
public FontStyle PeriodicTableFontStyle
{
get
{
return PeriodicTableStyle.PeriodicTableFontStyle;
}
set
{
PeriodicTableStyle.PeriodicTableFontStyle = value;
}
}
///
/// Gets or sets the size of the periodic table font.
///
///
/// The size of the periodic table font.
///
public double PeriodicTableFontSize
{
get
{
return PeriodicTableStyle.PeriodicTableFontSize;
}
set
{
PeriodicTableStyle.PeriodicTableFontSize = value;
}
}
///
/// Gets or sets the color of the element font.
///
///
/// The color of the element font.
///
public Color ElementFontColor
{
get
{
return PeriodicTableStyle.ElementFontColor;
}
set
{
PeriodicTableStyle.ElementFontColor = value;
}
}
///
/// Initializes a new instance of the class.
///
public PeriodicTableVisualSettings()
{
this.InitializeComponent();
this.DataContext = this;
this.UpdateCombos();
}
///
/// Handles the Click event of the ResetStylesButton control.
///
/// The source of the event.
/// The instance containing the event data.
private void ResetStylesButton_Click(object sender, RoutedEventArgs e)
{
PeriodicTableStyle.ResetStyles();
this.UpdateCombos();
}
///
/// Sets the combo boxes to have the values from the dictionary
///
private void UpdateCombos()
{
this.BackgroundColorCombo.SelectedColor = this.BackgroundColor;
this.IncludedElementColorCombo.SelectedColor = this.IncludedElementColor;
this.ExcludedElementColorCombo.SelectedColor = this.ExcludedElementColor;
this.IdleElementColorCombo.SelectedColor = this.IdleElementColor;
this.ElementBorderColorCombo.SelectedColor = this.ElementBorderColor;
this.ElementHighlightColorCombo.SelectedColor = this.ElementHighlightColor;
this.PeriodicTableFontFamilyCombo.SelectedValue = this.PeriodicTableFontFamily;
this.PeriodicTableFontStyleCombo.SelectedValue = this.PeriodicTableFontStyle;
this.PeriodicTableFontSizeCombo.SelectedValue = this.PeriodicTableFontSize;
this.ElementFontColorCombo.SelectedColor = this.ElementFontColor;
}
}
}