Example #1
0
        private void Bt1_Click(object sender, EventArgs e)
        {
            for (int i = data.Count; i >= 0; i--)
            {
                data.Remove(i);
            }

            if (btStart.Text == "Iniciar a coleta")
            {
                lbMoviment.Text    = "Repouso";
                lbMoviment.Visible = true;
                btStart.Text       = "Parar a coleta";
                ImageShow();
                TimerOne.Start();
                DataSave();
            }
            else if (btStart.Text == "Parar a coleta")
            {
                pbMain.Image       = imageList[0];
                lbMoviment.Visible = false;
                btStart.Text       = "Iniciar a coleta";
                TimerOne.Stop();
                countTwo      = 0;
                countOne      = 0;
                countT        = 0;
                countP        = 0;
                lbCountT.Text = "0";
                lbCountP.Text = "0";
            }
        }
Example #2
0
 private void BtColeta_Click(object sender, EventArgs e)
 {
     if (BtColeta.Text == "Iniciar Coleta")
     {
         BtColeta.Text     = "Parar Coleta";
         pnTrigger.Visible = true;
         TimerOne.Start();
     }
     else if (BtColeta.Text == "Parar Coleta")
     {
         BtColeta.Text = "Iniciar Coleta";
         TimerOne.Stop();
         countTwo          = 0;
         countOne          = 0;
         countT            = 0;
         countP            = 0;
         lbCountT.Text     = "0";
         pbMain.Image      = null;
         pnTrigger.Visible = false;
         BtColeta.Enabled  = false;
     }
 }