private void PluginsList_MouseDoubleClick(object sender, MouseButtonEventArgs e) { var list = (ListBox)sender; object item = list.SelectedItem; int itemIndex = list.SelectedIndex; Task.Factory.StartNew( () => { OptionsWindow.SetSetting("AI_behavior", $"{itemIndex}{ item}"); } ); DialogResult = true; }
private void default_Checked(object sender, RoutedEventArgs e) { if ((sender as CheckBox) == defaultCheckbox) { Task.Factory.StartNew( () => { OptionsWindow.SetSetting("AI_behavior", "default"); } ); if (pluginCheckbox != null) { pluginCheckbox.IsChecked = false; PluginsList.IsEnabled = false; } } else { InitListBoxSourse(); } }