private void Auto_Click(object sender, EventArgs e) { this.Close(); AutoMode auto = new AutoMode(serialPort); auto.VisibleForm(); }
private void Auto_Click(object sender, EventArgs e) { this.Hide(); AutoMode auto = new AutoMode(serial); auto.Show(); }
private void SetThreshold_Click(object sender, EventArgs e) { try { var high = double.Parse(High.Text); var low = double.Parse(Low.Text); AutoMode.SetLimits(high, low); serial.WriteToPort("SET LIMIT " + low + " " + high + '\r'); } catch (FormatException) { MessageBox.Show("Enter the temperature in correct format"); } }