private void Form1_Load(object sender, EventArgs e) { string path = @"D:\_FCIS\Sna 4\Semester 1\Modeling _ simulation\Simulation_Project\Task 4 - InventorySimulation\InventorySimulation\TestCases\TestCase1.txt"; SimulationSystem simulationSystem = new SimulationSystem(); simulationSystem.Run(path); dataGridView1.DataSource = simulationSystem.SimulationTable; EndingInventoryAverage.Text = "Ending Inventory Average: " + simulationSystem.PerformanceMeasures.EndingInventoryAverage.ToString(); ShortageQuantityAverage.Text = "Shortage Quantity Average: " + simulationSystem.PerformanceMeasures.ShortageQuantityAverage.ToString(); string testingResult = TestingManager.Test(simulationSystem, Constants.FileNames.TestCase1); MessageBox.Show(testingResult); }
private void Simulate_Click(object sender, EventArgs e) { if (SimulationReady() == -1) { MessageBox.Show("Make sure you have filled all the fields"); } else { Program.Run(); View(); string testingResult = TestingManager.Test(Program, Constants.FileNames.TestCase1); MessageBox.Show(testingResult); } }