예제 #1
0
 private void Button_Reset_Click(object sender, EventArgs e)
 {
     Panel_Configuration.Hide();
     Panel_Simulation.Hide();
     ModifyPanelForPrey();
     HideItemDetailComponents();
     SetInitialStatus();
     PictureBox_Graph.Image = new Bitmap(1300, 1000);
 }
예제 #2
0
        private void Button_Next_Click(object sender, EventArgs e)
        {
            if (ConfigurePhase == "Prey")
            {
                this.ConfigurePhase = "Predator";
                ModifyPanelForPredator();
            }
            else if (ConfigurePhase == "Predator")
            {
                this.ConfigurePhase = "Prey";
                ModifyPanelForPrey();

                HideItemDetailComponents();
                Panel_Configuration.Hide();
                Panel_Simulation.Hide();

                Notification msg = new Notification("Presas y depredadores definidos correctamente.");
                msg.ShowDialog();

                this.ItemsConfigurated = true;
            }
        }
예제 #3
0
        private void Button_Start_Click(object sender, EventArgs e)
        {
            Notification msg;

            try
            {
                if (!ItemsConfigurated)
                {
                    msg = new Notification("Las presas y depredadores aún no se definen.");
                    msg.ShowDialog();
                    return;
                }

                SimulationMatch = new SimulationMatch(this);
                SimulationMatch.SetInitialStatus(new Point(Panel_Simulation.Width / 2, 0));
                Panel_Simulation.Show();
                Panel_Simulation.BringToFront();
            }
            catch
            {
                msg = new Notification("Error al intentar recrear la simulación.");
                msg.ShowDialog();
            }
        }