예제 #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();
        }
예제 #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;
            }
        }
예제 #3
0
 public static void Stop()
 {
     SystemController.GetInstance().StopRefresh();
 }
예제 #4
0
 public static void Execute()
 {
     SystemController.GetInstance().ExecuteRefresh();
 }