Added Ui to alter simulation settings and added paralell processing with huge performance benefits over little grids
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PropagationRemasteredBeta
|
||||
{
|
||||
public partial class MainVue : Form
|
||||
{
|
||||
public Size terrainSize;
|
||||
public int infectedProportion;
|
||||
public int resistantProportion;
|
||||
public int deathRate;
|
||||
public int infectionRate;
|
||||
public int cureTime;
|
||||
public MainVue()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void MainVue_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btnRunSimulation_Click(object sender, EventArgs e)
|
||||
{
|
||||
terrainSize = new Size(Convert.ToInt32(nupPopulationSize.Value),Convert.ToInt32(nupPopulationSize.Value));
|
||||
infectedProportion = Convert.ToInt32(nupInfecteds.Value);
|
||||
resistantProportion = Convert.ToInt32(nupImmunes.Value);
|
||||
deathRate = Convert.ToInt32(nupMortality.Value);
|
||||
infectionRate = Convert.ToInt32(nupInfectiosity.Value);
|
||||
cureTime = Convert.ToInt32(nupCureTime.Value);
|
||||
|
||||
SimulationVue sm = new SimulationVue(terrainSize,infectedProportion,resistantProportion,deathRate,infectionRate,cureTime);
|
||||
sm.Closed += (s, args) => this.Show();
|
||||
sm.Show();
|
||||
this.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user