Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                chart1.Series["Series1"].Points.Clear();
                chart1.Series["Series2"].Points.Clear();

                int doors = int.Parse(txtDoors.Text);
                int rep   = int.Parse(txtRep.Text);
                int paus  = int.Parse(txtPause.Text);

                _log = new MainLog(doors, rep, paus);
                _log.OnChangedDecision     += this._log_OnChangedDecision;
                _log.OnDontChangedDecision += _log_OnDontChangedDecision;
                _log.Start();

                btnStart.Enabled = false;
                BtnCont.Enabled  = false;
                btnPause.Enabled = true;
                btnStop.Enabled  = true;
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }