private void button1_Click(object sender, EventArgs e) { MessageBox.Show("Make sure you're at the flower bed before pressing OK!"); string selected = (string)comboBox1.SelectedItem; Gardening.plantFlower(dictionary[selected]); }
private void button1_Click(object sender, EventArgs e) { DialogResult confirmation; confirmation = MessageBox.Show("Make sure you're at the flower bed before pressing OK!", "", MessageBoxButtons.OKCancel); if (confirmation.Equals(DialogResult.Cancel)) { return; } string selected = (string)comboBox1.SelectedItem; Gardening.plantFlower(dictionary[selected]); }
private void button3_Click(object sender, EventArgs e) { Gardening.removePlant(); }
private void button2_Click(object sender, EventArgs e) { Gardening.waterPlant(); }