Beispiel #1
0
 /// <summary>
 /// Konstruktor
 /// </summary>
 /// <param name="view">View die verwaltet werden soll</param>
 public CustomerDataViewModel(ICustomerDataView view)
 {
     this.view = view;
     customer  = new Model.Customer();
     list      = LoadCustomerList();
     view.BindViewToModel(this);
 }
Beispiel #2
0
        private void OnNavBarButtonClick(object sender, EventArgs e)
        {
            // Check if a customer window exists already
            if (!_ci.WindowManager.ExistsWindow <ICustomerDataView>())
            {
                ICustomerDataView     customerView = CustomerFactories.CustomerDataViewFactory.CreateCustomerView();
                CustomerDataViewModel viewModel    = new CustomerDataViewModel(customerView);

                _ci.WindowManager.RegisterWindow(customerView);
            }
            else
            {
                _ci.WindowManager.BringWindowToFront <ICustomerDataView>();
            }
        }