コード例 #1
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            GAController GAController = new GAController(JSONFile.ToString());

            GARun GARunWindow = new GARun(GAController);

            GARunWindow.Show();
        }
コード例 #2
0
        private void MenuItemProgress_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new CommonOpenFileDialog();

            dlg.Title                   = "Choose XML file";
            dlg.IsFolderPicker          = false;
            dlg.AllowNonFileSystemItems = true;
            dlg.EnsureFileExists        = true;
            dlg.EnsurePathExists        = true;
            dlg.EnsureReadOnly          = false;
            dlg.EnsureValidNames        = true;
            dlg.Multiselect             = false;
            dlg.ShowPlacesList          = true;
            dlg.Filters.Add(new CommonFileDialogFilter("Balance File Format", "xml"));

            if (dlg.ShowDialog() == CommonFileDialogResult.Ok)
            {
                GAController GAController = new GAController("");
                GAController.LoadRunFromFileAndSetDefaults(dlg.FileName);

                GARun GARunWindow = new GARun(GAController);
                GARunWindow.Show();
            }
        }