public MainWindow() { InitializeComponent(); DrawSystem.GetInstance().Drawers.Add(new GraficDrawer(GraficChart)); DrawSystem.GetInstance().Drawers.Add(new HystogramDrawer(HystoChart)); DrawSystem.GetInstance().Drawers.Add(new DiagramDrawer(CircleChart)); }
public static void Restore() { Memento.Restore(); History.GetInstance().RenewData(); DrawSystem.GetInstance().Update(); }
private void TimerTick(object sender, EventArgs e) { Counter.GetInstance().Recount(); History.GetInstance().RenewData(); DrawSystem.GetInstance().Update(); DrawSystem.GetInstance().DoDraw(); }
public static void Init() { if (new InitWindow().ShowDialog() == DialogResult.OK) { new InitWindow2().ShowDialog(); new SettingsWindow().ShowDialog(); DrawSystem.GetInstance().DoDraw(); } }
public static DrawSystem GetInstance() { if (instance == null) { instance = new DrawSystem(); } return(instance); }
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(); }