Exemple #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));
 }
Exemple #2
0
        public static void Restore()
        {
            Memento.Restore();

            History.GetInstance().RenewData();
            DrawSystem.GetInstance().Update();
        }
Exemple #3
0
 private void TimerTick(object sender, EventArgs e)
 {
     Counter.GetInstance().Recount();
     History.GetInstance().RenewData();
     DrawSystem.GetInstance().Update();
     DrawSystem.GetInstance().DoDraw();
 }
Exemple #4
0
 public static void Init()
 {
     if (new InitWindow().ShowDialog() == DialogResult.OK)
     {
         new InitWindow2().ShowDialog();
         new SettingsWindow().ShowDialog();
         DrawSystem.GetInstance().DoDraw();
     }
 }
Exemple #5
0
        public static DrawSystem GetInstance()
        {
            if (instance == null)
            {
                instance = new DrawSystem();
            }

            return(instance);
        }
Exemple #6
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();
 }