示例#1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     f = null;
     trackBar2.Maximum = (pictureBox1.Height / trackBar1.Value)*4;
     trackBar2.Value = trackBar2.Maximum / 2;
     particleLabel.Text = trackBar2.Value.ToString();
     this.Height = 504;
 }
示例#2
0
 private void ClearButton_Click(object sender, EventArgs e)
 {
     timer1.Stop();
     f = null;
     trackBar1.Visible = true;
     trackBar2.Visible = true;
     checkBox1.Visible = false;
     checkBox2.Visible = false;
     PauseButt.Visible = false;
     BasicRadio.Enabled = true;
     MixedRadio.Enabled = true;
     SlowRadio.Enabled = true;
     pictureBox1.Refresh();
 }
示例#3
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            trackBar1.Visible = false;
            trackBar2.Visible = false;
            checkBox1.Visible = true;
            checkBox2.Visible = true;
            PauseButt.Visible = true;
            BasicRadio.Enabled = false;
            MixedRadio.Enabled = false;
            SlowRadio.Enabled = false;
            PauseButt.Text = "Пауза";
            prepareStatisticField();
            int test = getRadioButtonPosition();

            f = new Field(pictureBox1.Width, pictureBox1.Height, trackBar1.Value, trackBar2.Value,getRadioButtonPosition());

            pictureBox1.Refresh();
            timer1.Start();
        }