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