Exemple #1
0
        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]);
        }
Exemple #2
0
        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]);
        }
Exemple #3
0
 private void button3_Click(object sender, EventArgs e)
 {
     Gardening.removePlant();
 }
Exemple #4
0
 private void button2_Click(object sender, EventArgs e)
 {
     Gardening.waterPlant();
 }