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

            History.GetInstance().RenewData();
            DrawSystem.GetInstance().Update();
        }
示例#3
0
 private void TimerTick(object sender, EventArgs e)
 {
     Counter.GetInstance().Recount();
     History.GetInstance().RenewData();
     DrawSystem.GetInstance().Update();
     DrawSystem.GetInstance().DoDraw();
 }
示例#4
0
 public static void Init()
 {
     if (new InitWindow().ShowDialog() == DialogResult.OK)
     {
         new InitWindow2().ShowDialog();
         new SettingsWindow().ShowDialog();
         DrawSystem.GetInstance().DoDraw();
     }
 }
示例#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();
 }