private void ComboboxStateOverride_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { if (AmeisenBot != null) { ((AmeisenBotLogic)AmeisenBot.Logic).ChangeMode((BotMode)comboboxStateOverride.SelectedItem); buttonStateConfig.IsEnabled = StateConfigWindows.ContainsKey((BotMode)comboboxStateOverride.SelectedItem); } }
private void ComboboxStateOverride_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { if (AmeisenBot != null) { AmeisenBot.StateMachine.StateOverride = (BotState)comboboxStateOverride.SelectedItem; buttonStateConfig.IsEnabled = StateConfigWindows.ContainsKey((BotState)comboboxStateOverride.SelectedItem); } }
private void ButtonStateConfig_Click(object sender, RoutedEventArgs e) { if (StateConfigWindows.ContainsKey((BotMode)comboboxStateOverride.SelectedItem)) { Window selectedWindow = StateConfigWindows[(BotMode)comboboxStateOverride.SelectedItem]; selectedWindow.ShowDialog(); if (((IStateConfigWindow)selectedWindow).ShouldSave) { AmeisenBot.ReloadConfig(((IStateConfigWindow)selectedWindow).Config); SaveConfig(); } } }