Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (btnStartTest.Text == "Start Simulatie")
            {
                trackBar1.Enabled = true;
                trackBar2.Enabled = true;
                trackBar3.Enabled = true;

                btnStartTest.Text = "Stop Simulatie";
            }
            else if (btnStartTest.Text == "Stop Simulatie")
            {
                trackBar1.Enabled = false;
                trackBar2.Enabled = false;
                trackBar3.Enabled = false;

                trackBar1.Value = 0;
                trackBar2.Value = 0;
                trackBar3.Value = 0;

                tank.ResetManuel();

                btnStartTest.Text = "Start Simulatie";
            }

            //tank.oilInflow = 120;
            //tank.waterInflow = 250;
            //tank.gasInflow = 0;
        }
Ejemplo n.º 2
0
 private void checkBox1_CheckedChanged(object sender, EventArgs e)
 {
     if (checkBox1.Checked)
     {
         groupBox1.Enabled = true;
         updateTimer.Start();
     }
     else
     {
         groupBox1.Enabled = false;
         updateTimer.Stop();
         tank1.ResetManuel();
     }
 }