private void DisplayInformation(FormSimulation SimulationForm) { labelPercentageOfInfectd.Text = $"Percentage of infected at the end: " + $"{SimulationForm.EndNumInfected} " + $"({((double)SimulationForm.EndNumInfected / (double)InputInitialPeople.Value) * 100:f0}%)"; labelR.Text = $"R (Effective Reporductive Number): {SimulationForm.R:f2}"; }
private void buttonLoad_Click(object sender, EventArgs e) { this.Hide(); using (var SimulationForm = new FormSimulation( (int)InputInitialPeople.Value, (int)InputInitialPercentageInfected.Value, false)) { SimulationForm.ShowDialog(); DisplayInformation(SimulationForm); } this.Show(); }