public HeaterControl() { InitializeComponent(); selectedProfile = null; mode = Modes.NORMAL; button_pressed = false; }
private void cbTitle_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (tbTemp.Text != "OFF") { OFF(); } selectedProfile = cbTitle.SelectedItem == null ? null : (HeaterProfile)((ComboBoxItem)cbTitle.SelectedItem).Tag; bnON.IsEnabled = selectedProfile != null; updateActiveTempButtons(); }