예제 #1
0
 public PhoneWindow(PhoneWindowViewModel mobile)
 {
     InitializeComponent();
     this.DataContext   = mobile;
     mobile.AnswerCall += _phoneAnswerCall;
     addButton.Click   += clearBoxes;
 }
예제 #2
0
 private void AddNewClient()
 {
     if (NumberNewClient != null)
     {
         bool check = !mobileOperator.Phones.Any(x => x.Number == NumberNewClient);
         if (check)
         {
             PhoneWindowViewModel mobile = new PhoneWindowViewModel(mobileOperator)
             {
                 Number = NumberNewClient
             };
             PhoneWindow phoneView = new PhoneWindow(mobile);
             phoneView.Show();
         }
     }
 }
예제 #3
0
 public void AddPhone(PhoneWindowViewModel phone)
 {
     Phones.Add(phone);
     phone.Call += DialingNumber;
     this.Call  += phone.ReceiveCall;
 }