public MainPanelController(GrowthSimulation v,  Habitat env)
 {
     view = v;
     environment = env;
     environment.AddNewBindingListener(new BindingListener(view));
     view.AddCloseListener(new CloseListener(env));
     view.StatusMessage("Started");
 }
Example #2
0
        static void Main()
        {
            double radius = 200, temperature = 10, density = 0.01;
            float scale = (float)0.5;
            double Desire = 1;
            double DesireRadius = Molecule.RADIUS * 10;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            growthSimulation = new GrowthSimulation((int)radius, scale);
            env = new Habitat(radius, temperature, density, growthSimulation.Center.X, growthSimulation.Center.Y, Desire, DesireRadius);
            densityBarController = new DensityBarController(growthSimulation, env);
            densityBarController.BindListeners();
            speedBarController = new SpeedBarController(growthSimulation, env);
            speedBarController.BindListeners();
            mainPanelController = new MainPanelController(growthSimulation, env);

            env.ThreadStart();

            Application.Run(growthSimulation);
        }
 public BindingListener(GrowthSimulation v)
 {
     view = v;
 }
 public DensityBarController(GrowthSimulation v, Habitat env)
 {
     view = v;
     environment = env;
 }