Esempio n. 1
0
        private void AcceptBtn_Click(object sender, EventArgs e)
        {
            if (ManualRB.Checked)
            {
                SystemController.GetInstance().ChangeRefreshStrategy(new ManualRefresh());
            }
            else if (FixedItterRB.Checked)
            {
                SystemController.GetInstance().ChangeRefreshStrategy(new FixedItterationsRefresh(int.Parse(ItterCountTextBox.Text)));
            }
            else if (AutoRefreshRB.Checked)
            {
                SystemController.GetInstance().ChangeRefreshStrategy(new AutomaticRefresh());
            }

            if (LogModelRB.Checked)
            {
                Counter.GetInstance().ChangeMathModel(new LogisticModel());
            }
            else if (NPopModelRB.Checked)
            {
                Counter.GetInstance().ChangeMathModel(new N_SpaciesModel_General());
            }

            Close();
        }
Esempio n. 2
0
        private void SettingsWindow_Load(object sender, EventArgs e)
        {
            ItterCountTextBox.Enabled = false;
            switch (SystemController.GetInstance().GetRefreshMode().Name)
            {
            case "ManualRefresh":
                ManualRB.Checked = true;
                break;

            case "FixedItterationsRefresh":
                FixedItterRB.Checked = true;
                break;

            case "AutomaticRefresh":
                AutoRefreshRB.Checked = true;
                break;
            }

            switch (Counter.GetInstance().GetMathModel().Name)
            {
            case "LogisticModel":
                LogModelRB.Checked = true;
                break;

            case "N_SpaciesModel_General":
                NPopModelRB.Checked = true;
                break;
            }
        }
Esempio n. 3
0
        public static SystemController GetInstance(IRefreshStrategy refreshStrategy = null)
        {
            if (instance == null)
            {
                instance = new SystemController(refreshStrategy);
            }

            return(instance);
        }
Esempio n. 4
0
 public static void Stop()
 {
     SystemController.GetInstance().StopRefresh();
 }
Esempio n. 5
0
 public static void Execute()
 {
     SystemController.GetInstance().ExecuteRefresh();
 }