Exemplo n.º 1
0
        public void fil()
        {
            //opcion de usar el metodo estrategia
            switch (filtrar.Text)
            {
            case "Viven":

                filtro = new PorVida();
                filtro.Filtrar(historial);
                break;

            case "No viven":
                filtro = new PorSinvida();
                filtro.Filtrar(historial);
                break;

            case "Mallard":
                filtro = new PorMallard();
                filtro.Filtrar(historial);
                break;

            case "Decoy":
                filtro = new Pordecoy();
                filtro.Filtrar(historial);
                break;

            case "Red Head":
                filtro = new Portredhead();
                filtro.Filtrar(historial);
                break;

            case "Toy":
                filtro = new Portoy();
                filtro.Filtrar(historial);
                break;

            case "Rubber":
                filtro = new Porrubber();
                filtro.Filtrar(historial);
                break;

            case "Vuelan":
                filtro = new Porvolar();
                filtro.Filtrar(historial);
                break;

            case "No vuelan":
                filtro = new Pornovolar();
                filtro.Filtrar(historial);
                break;

            case "Tienen cohetes":
                filtro = new Porcohetes();
                filtro.Filtrar(historial);
                break;

            case "Quack":
                filtro = new PorQuack();
                filtro.Filtrar(historial);
                break;

            case "Squeak":
                filtro = new Squeaks();
                filtro.Filtrar(historial);
                break;

            case "Nadar":
                filtro = new PorNadar();
                filtro.Filtrar(historial);
                break;

            case ".........":
                filtro = new Pormute();
                filtro.Filtrar(historial);
                break;
            }
        }