Example #1
0
 private void buttonRus_Click(object sender, EventArgs e)
 {
     builder = new RusBuilder();
     director = new Director(builder);
     bank = new Bank(director);
     facade = new MyFacade(bank);
     facade.setImplementation(new FormImplementation());
     facade.createWindows();
     Form1 form1 = new Form1(facade);
     this.Hide();
     form1.ShowDialog();
     this.Close();
 }
Example #2
0
 public Bank(Director director)
 {
     this.director = director;
     this.listBankWindows = new List<BankWindow>();
     this.clientQueue = new ClientQueue();
     this.periodTimer = 1000;
     this.numberOfNewClients = 0;
     this.timer = new Timer(periodTimer);
     this.timer.Elapsed += OnTimedEvent;
     this.countBankWindows = 0;
     this.nameClients = new List<string>();
     this.timerActive = false;
     this.manager = new OperationManager();
     string line;
     System.IO.StreamReader file = new System.IO.StreamReader(@"nameClients.txt",System.Text.Encoding.Default);
     while ((line = file.ReadLine()) != null)
     {
         this.nameClients.Add(line);
     }
     file.Close();
 }