示例#1
0
        public void TypeDuck(Label a, Label b, Label c, PictureBox pic)
        {
            IQuack quack;
            Ivolar ivolar;

            quack  = new Squeak();
            ivolar = new Nofly();
            Swim s = new Swim();

            a.Text = quack.TypeQuack();
            b.Text = ivolar.Comportamiento();
            c.Text = s.S();
            quack.Typesound();
            Duckphotos x = new Duckphotos();

            x.rubber(pic);
        }
示例#2
0
        private void listaquack_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (listaquack.SelectedIndex)
            {
            case 0:
                quack = new Quack();
                quack.Typesound();
                break;

            case 1:

                break;

            case 2:
                squeak = new Squeak();
                squeak.Typesound();

                break;
            }
        }