private void btn_gui_Click(object sender, EventArgs e) { SimulationTable ST = new SimulationTable(); this.Hide(); ST.ShowDialog(); this.Close(); }
private async void StartSimulationButton_Click(object sender, EventArgs e) { DisableAllControls(); SimulationSystem system = LoadSystemFromUI(); DialogResult result; do { await Task.Run(() => Igniter.ParallelRun(system)); SimulationTable TableViewer = new SimulationTable(system); TableViewer.ShowDialog(); result = MessageBox.Show("Run Again?", "Results", MessageBoxButtons.YesNoCancel); }while (result == DialogResult.Yes); EnableAllControls(); if (result == DialogResult.No) { ClearUI(); } }