Ejemplo n.º 1
0
        private void BTPrint_Click(object sender, EventArgs e)
        {
            TBOutput.Clear();
            string type = "";

            switch (CBTypes.SelectedIndex)
            {
            case 0:
                type = "Животные";
                break;

            case 1:
                type = "Млекопитающие";
                break;

            case 2:
                type = "Птицы";
                break;

            case 3:
                type = "Парнокопытные";
                break;
            }

            FormPrinter printer = new FormPrinter();

            printer.PrintElThisType = this;
            сollection.PrintThisType(type, printer);
        }
Ejemplo n.º 2
0
        private void BTOutput_Click(object sender, EventArgs e)
        {
            FormPrinter printer = new FormPrinter();

            printer.PrintEach = this;

            collection.PrintEach(printer);
        }