コード例 #1
0
        private void ViewLoaded(RoutedEventArgs e)
        {
            MainWindow mainWindow = e.Source as MainWindow;
            TextBox    textBox    = mainWindow.FindName("textBox") as TextBox;

            textBox.Text = baseConfiguration.CaptureInterval.ToString();

            RadioRule4IsChecked = baseConfiguration.IsGameRule4;
            ComboxIndexAiRule4  = AiList.IndexOf(baseConfiguration.Rule4AiFileName);
            ComboxIndexAiRule0  = AiList.IndexOf(baseConfiguration.Rule0AiFileName);
        }
コード例 #2
0
        private void ViewLoaded(RoutedEventArgs e)
        {
            MainWindow mainWindow = e.Source as MainWindow;

            (mainWindow.FindName("textBox") as TextBox).Text            = baseConfiguration.CaptureInterval.ToString();
            (mainWindow.FindName("textBoxTurnTimeout") as TextBox).Text = baseConfiguration.TurnTimeout.ToString();

            RadioRule4IsChecked = baseConfiguration.IsGameRule4;
            ComboxIndexAiRule4  = AiList.IndexOf(baseConfiguration.Rule4AiFileName);
            ComboxIndexAiRule0  = AiList.IndexOf(baseConfiguration.Rule0AiFileName);

            renjuAiHelper = new RenjuAiHelper();
            renjuAiHelper.AiCpuUtilizationRate += RenjuAiHelper_AiCpuUtilizationRate;
            renjuAiHelper.AiResponse           += RenjuAiHelper_AiResponse;
            renjuAiHelper.CheckCpuInterval      = 300;

            RenJunAiUpdate();
        }