コード例 #1
0
        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;
        }
コード例 #2
0
 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();
     }
 }