Esempio n. 1
0
 public MainWindow()
 {
     InitializeComponent();
     DrawSystem.GetInstance().Drawers.Add(new GraficDrawer(GraficChart));
     DrawSystem.GetInstance().Drawers.Add(new HystogramDrawer(HystoChart));
     DrawSystem.GetInstance().Drawers.Add(new DiagramDrawer(CircleChart));
 }
Esempio n. 2
0
        public static void Restore()
        {
            Memento.Restore();

            History.GetInstance().RenewData();
            DrawSystem.GetInstance().Update();
        }
Esempio n. 3
0
 private void TimerTick(object sender, EventArgs e)
 {
     Counter.GetInstance().Recount();
     History.GetInstance().RenewData();
     DrawSystem.GetInstance().Update();
     DrawSystem.GetInstance().DoDraw();
 }
Esempio n. 4
0
 public static void Init()
 {
     if (new InitWindow().ShowDialog() == DialogResult.OK)
     {
         new InitWindow2().ShowDialog();
         new SettingsWindow().ShowDialog();
         DrawSystem.GetInstance().DoDraw();
     }
 }
Esempio n. 5
0
 private void AcceptBtn_Click(object sender, EventArgs e)
 {
     foreach (DataGridViewRow row in InitTable.Rows)
     {
         if (row.Cells["SpecName"].Value.ToString() != "")
         {
             Ecosystem.GetInstance().AddSpecies(
                 new Species(
                     row.Cells["SpecName"].Value.ToString(),
                     int.Parse(row.Cells["Count"].Value.ToString()),
                     double.Parse(row.Cells["Birth"].Value.ToString()),
                     double.Parse(row.Cells["Death"].Value.ToString()),
                     int.Parse(row.Cells["EcoCapacity"].Value.ToString()))
                 );
         }
     }
     Close();
     DrawSystem.GetInstance().Update();
 }