Ejemplo n.º 1
0
        private void Simulate_Click(object sender, EventArgs e)
        {
            SimulationSystem SS = new SimulationSystem();

            if (!Imported)
            {
                SS = FormulateSimulattor();
            }
            else
            {
                SS = ReadTestCase(DirCase);
            }


            SS.BeginSimulation();


            //string TestRes = TestingManager.Test(SS, Constants.FileNames.TestCase1);
            //MessageBox.Show(TestRes);

            this.Text = "News Paper Problem - Home";
            SimulationTable ST = new SimulationTable(SS);

            ST.Show();
        }
Ejemplo n.º 2
0
        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();
            }
        }