Exemple #1
0
            // IComponentConnector

            public void Connect(int connectionId, global::System.Object target)
            {
                switch (connectionId)
                {
                case 4:     // MainPage.xaml line 93
                    this.obj4 = (global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl)target;
                    break;

                case 5:     // MainPage.xaml line 76
                    this.obj5 = (global::Windows.UI.Xaml.Controls.ListView)target;
                    this.bindingsTracking.RegisterTwoWayListener_5(this.obj5);
                    break;

                case 11:     // MainPage.xaml line 61
                    this.obj11      = (global::Windows.UI.Xaml.Controls.Button)target;
                    this.obj11Click = (global::System.Object p0, global::Windows.UI.Xaml.RoutedEventArgs p1) =>
                    {
                        this.dataRoot.ViewModel.AddCustomer();
                    };
                    ((global::Windows.UI.Xaml.Controls.Button)target).Click += obj11Click;
                    break;

                case 12:     // MainPage.xaml line 67
                    this.obj12      = (global::Windows.UI.Xaml.Controls.Button)target;
                    this.obj12Click = (global::System.Object p0, global::Windows.UI.Xaml.RoutedEventArgs p1) =>
                    {
                        this.dataRoot.ViewModel.DeleteCustomer();
                    };
                    ((global::Windows.UI.Xaml.Controls.Button)target).Click += obj12Click;
                    break;

                default:
                    break;
                }
            }
 public bool SetDataRoot(global::System.Object newDataRoot)
 {
     this.bindingsTracking.ReleaseAllListeners();
     if (newDataRoot != null)
     {
         this.dataRoot = (global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl)newDataRoot;
         return(true);
     }
     return(false);
 }
 // Update methods for each path node used in binding steps.
 private void Update_(global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_Customer(obj.Customer, phase);
         }
     }
 }
                public void UpdateChildListeners_(global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl obj)
                {
                    CustomerDetailControl_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        if (bindings.dataRoot != null)
                        {
                            bindings.dataRoot.UnregisterPropertyChangedCallback(global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl.CustomerProperty, tokenDPC_Customer);
                        }
                        if (obj != null)
                        {
                            bindings.dataRoot = obj;
                            tokenDPC_Customer = obj.RegisterPropertyChangedCallback(global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl.CustomerProperty, DependencyPropertyChanged_Customer);
                        }
                    }
                }
                public void DependencyPropertyChanged_Customer(global::Windows.UI.Xaml.DependencyObject sender, global::Windows.UI.Xaml.DependencyProperty prop)
                {
                    CustomerDetailControl_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl obj = sender as global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl;
                        if (obj != null)
                        {
                            bindings.Update_Customer(obj.Customer, DATA_CHANGED);
                        }
                    }
                }
Exemple #6
0
 public static void Set_WiredBrainCoffee_CustomersApp_Controls_CustomerDetailControl_Customer(global::WiredBrainCoffee.CustomersApp.Controls.CustomerDetailControl obj, global::WiredBrainCoffee.CustomersApp.Model.Customer value, string targetNullValue)
 {
     if (value == null && targetNullValue != null)
     {
         value = global::WiredBrainCoffee.CustomersApp.Model.CustomerConverter.CreateCustomerFromString(targetNullValue);
     }
     obj.Customer = value;
 }