Esempio n. 1
0
        static void Main(string[] args)
        {
            Creater creater  = new Creater();
            Calisan calisan1 = creater.FactoryMethod(Calisanlar.Personel);
            Calisan calisan2 = creater.FactoryMethod(Calisanlar.Sofor);

            calisan1.calisan();
            calisan2.calisan();

            Console.Read();
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            AllCars             uretilecekarac      = (AllCars)this.comboBox1.SelectedItem;
            Creater             creater             = new Creater();
            AbstractFactoryCars abstractFactoryCars = creater.FactoryMethod(uretilecekarac);

            abstractFactoryCars.Lastikler();
            abstractFactoryCars.Motor();
            abstractFactoryCars.Renk();
            abstractFactoryCars.Test();
            textBox1.Text += abstractFactoryCars.IslemSonuc() + " ";
        }