private void btnstop_Click(object sender, EventArgs e) { if (Hora.Enabled == true) { micro.Ligar(); Hora.Enabled = false; Unlock(); ExibirContador(); lblPAUSE.Text = "PAUSE"; lblPAUSE.Visible = false; } else { micro.Desligar(); COMIDAPRONTA.Enabled = false; Hora.Enabled = true; temp.SetHora(DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second); ExibirHora(); Lock(); Cronometro.Enabled = false; PotenciaDisplay.Enabled = false; lblPAUSE.Text = ""; } picTampa.Enabled = true; btnabrir.Enabled = true; }
private void button1_Click(object sender, EventArgs e) { if (maskedTextBox1.Text.Length == 8) { obj.SetHora(int.Parse(maskedTextBox1.Text.Substring(0, 2)), int.Parse(maskedTextBox1.Text.Substring(3, 2)), int.Parse(maskedTextBox1.Text.Substring(6, 2))); } obj.GetHora(); if (obj.horas_validas) { label3.Text = obj.GetHora().ToLongTimeString().ToString(); } else { label3.Text = "Hora inválida."; } }