public MinMaxConfig() { this.InitializeComponent(); // Fill in some default colors ViewUtility.InitializeColorComboBox(MinColorComboBox); ViewUtility.InitializeColorComboBox(MaxColorComboBox); MinColorComboBox.SelectedIndex = 0; MaxColorComboBox.SelectedIndex = 0; }
/// <summary> /// Set up current lighting modes and default colors /// </summary> private void InitializeLightingModes() { LightingModeComboBox.DisplayMemberPath = "Key"; LightingModeComboBox.SelectedValuePath = "Value"; LightingModeComboBox.Items.Add(new KeyValuePair <string, DisplayMode.DisplayModeValue>("Hot Needle", DisplayMode.DisplayModeValue.HotNeedle)); LightingModeComboBox.Items.Add(new KeyValuePair <string, DisplayMode.DisplayModeValue>("Block Needle", DisplayMode.DisplayModeValue.BlockNeedle)); LightingModeComboBox.Items.Add(new KeyValuePair <string, DisplayMode.DisplayModeValue>("BG Rotate", DisplayMode.DisplayModeValue.BackgroundRotate)); LightingModeComboBox.Items.Add(new KeyValuePair <string, DisplayMode.DisplayModeValue>("Min Max", DisplayMode.DisplayModeValue.MinMax)); LightingModeComboBox.SelectedIndex = 0; ViewUtility.InitializeColorComboBox(HotColorComboBox); // TODO - read current values from FizViz on connect HotColorComboBox.SelectedIndex = 0; }
public BackgroundColorConfig() { this.InitializeComponent(); ViewUtility.InitializeColorComboBox(Color1ComboBox); ViewUtility.InitializeColorComboBox(Color2ComboBox); ViewUtility.InitializeColorComboBox(Color3ComboBox); ViewUtility.InitializeColorComboBox(Color1ComboBox_Gradient); ColorModeComboBox.DisplayMemberPath = "Key"; ColorModeComboBox.SelectedValuePath = "Value"; ColorModeComboBox.Items.Add(new KeyValuePair <string, BackgroundColorMode>("Solid", BackgroundColorMode.Solid)); ColorModeComboBox.Items.Add(new KeyValuePair <string, BackgroundColorMode>("Blended", BackgroundColorMode.Blend)); ColorModeComboBox.Items.Add(new KeyValuePair <string, BackgroundColorMode>("Segmented", BackgroundColorMode.Segment)); ColorModeComboBox.SelectedIndex = 0; UpdateParameterVisibility(); }