private void SaveButton_Click(object sender, EventArgs e) { int maxweight = string.IsNullOrEmpty(maxWeightTextBox.Text) ? 0 : Convert.ToInt32(maxWeightTextBox.Text); aRefrigerator = new Refrigerator(maxweight); maxWeightTextBox.Clear(); }
private void SaveButton_Click(object sender, EventArgs e) { double maxWeight = Convert.ToDouble(maxWeightTakeTextBox.Text); Refrigerator = new Refrigerator(maxWeight); maxWeightTakeTextBox.Text = ""; Show(); }
private void SaveButton_Click(object sender, EventArgs e) { try { flag4 = true; refrigerator = new Refrigerator(Convert.ToDouble(maxWeightTakeTextBox.Text)); maxWeightTakeTextBox.Clear(); } catch (Exception m) { MessageBox.Show("Please input a double number only."); } }
private void SaveButton(object sender, EventArgs e) { refrigerator = new Refrigerator(Convert.ToDouble(maxWeightTakeTextBox.Text)); maxWeightTakeTextBox.Clear(); }