示例#1
0
 private void ClearBut_Click(object sender, EventArgs e)
 {
     timer1.Stop();
     f = null;
     fA = null;
     trackBar1.Visible = true;
     trackBar2.Visible = true;
     checkBox1.Visible = false;
     butPause.Visible = false;
     radioButton1.Enabled = true;
     radioButton2.Enabled = true;
     pictureBox1.Refresh();
 }
示例#2
0
        private void StartBut_Click(object sender, EventArgs e)
        {
            trackBar1.Visible = false;
            trackBar2.Visible = false;
            checkBox1.Visible = true;
            butPause.Visible = true;
            radioButton1.Enabled = false;
            radioButton2.Enabled = false;

            if(rbc)
                f = new Field(pictureBox1.Width,pictureBox1.Height,trackBar2.Value,trackBar1.Value);
            else
                fA = new FieldA(pictureBox1.Width,pictureBox1.Height,trackBar2.Value,trackBar1.Value);
            
            pictureBox1.Refresh();
            timer1.Start();
        }
示例#3
0
 private void radioButton1_CheckedChanged(object sender, EventArgs e)
 {
     if (radioButton1.Checked)
     {
         rbc = true;
         fA = null;
         trackBar1.Maximum = pictureBox1.Height / trackBar2.Value;
         trackBar1.Value = trackBar1.Maximum / 2;
         label8.Text = "Верхний канал";
         label7.Text = "Нижний канал";
         label3.Text = "Текущий шаг";
         label4.Text = "Предыдущий шаг";
     }
     else
     {
         rbc = false;
         f = null;
         trackBar1.Maximum = 40;
         trackBar1.Value = 20;
         label8.Text = "Текущий шаг";
         label7.Text = "Предыдущий шаг";
         label3.Text = "Верхний канал";
         label4.Text = "Нижний канал";
     }
     particleLabel.Text = trackBar1.Value.ToString();
 }
示例#4
0
 private void Form1_Load(object sender, EventArgs e)
 {
     if (radioButton1.Checked)
     {
         rbc = true;
         fA = null;
         trackBar1.Maximum = pictureBox1.Height / trackBar2.Value;
         trackBar1.Value = trackBar1.Maximum / 2;
     }
     else
     {
         rbc = false;
         f = null;
         trackBar1.Maximum = 40;
         trackBar1.Value = 20;
     }
     particleLabel.Text = trackBar1.Value.ToString();
 }