コード例 #1
0
ファイル: MainPage.g.cs プロジェクト: varshaauti27/WPF
 public bool SetDataRoot(global::System.Object newDataRoot)
 {
     this.bindingsTracking.ReleaseAllListeners();
     if (newDataRoot != null)
     {
         this.dataRoot = (global::WiredBrainCoffee.CustomersApp.Model.Customer)newDataRoot;
         return(true);
     }
     return(false);
 }
コード例 #2
0
                public void PropertyChanged_Customer(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    CustomerDetailControl_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::WiredBrainCoffee.CustomersApp.Model.Customer obj = sender as global::WiredBrainCoffee.CustomersApp.Model.Customer;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_Customer_FirstName(obj.FirstName, DATA_CHANGED);
                                bindings.Update_Customer_LastName(obj.LastName, DATA_CHANGED);
                                bindings.Update_Customer_IsDeveloper(obj.IsDeveloper, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "FirstName":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_Customer_FirstName(obj.FirstName, DATA_CHANGED);
                                }
                                break;
                            }

                            case "LastName":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_Customer_LastName(obj.LastName, DATA_CHANGED);
                                }
                                break;
                            }

                            case "IsDeveloper":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_Customer_IsDeveloper(obj.IsDeveloper, DATA_CHANGED);
                                }
                                break;
                            }

                            default:
                                break;
                            }
                        }
                    }
                }
コード例 #3
0
 private void Update_Customer(global::WiredBrainCoffee.CustomersApp.Model.Customer obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_Customer(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_Customer_FirstName(obj.FirstName, phase);
             this.Update_Customer_LastName(obj.LastName, phase);
             this.Update_Customer_IsDeveloper(obj.IsDeveloper, phase);
         }
     }
 }
コード例 #4
0
 public void UpdateChildListeners_Customer(global::WiredBrainCoffee.CustomersApp.Model.Customer obj)
 {
     if (obj != cache_Customer)
     {
         if (cache_Customer != null)
         {
             ((global::System.ComponentModel.INotifyPropertyChanged)cache_Customer).PropertyChanged -= PropertyChanged_Customer;
             cache_Customer = null;
         }
         if (obj != null)
         {
             cache_Customer = obj;
             ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_Customer;
         }
     }
 }
コード例 #5
0
ファイル: MainPage.g.cs プロジェクト: varshaauti27/WPF
 private void Update_ViewModel_SelectedCustomer(global::WiredBrainCoffee.CustomersApp.Model.Customer obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_ViewModel_SelectedCustomer(obj);
     if ((phase & ((1 << 0) | NOT_PHASED | DATA_CHANGED)) != 0)
     {
         // MainPage.xaml line 93
         if (!isobj4CustomerDisabled)
         {
             XamlBindingSetters.Set_WiredBrainCoffee_CustomersApp_Controls_CustomerDetailControl_Customer(this.obj4, obj, null);
         }
         // MainPage.xaml line 76
         if (!isobj5SelectedItemDisabled)
         {
             XamlBindingSetters.Set_Windows_UI_Xaml_Controls_Primitives_Selector_SelectedItem(this.obj5, obj, null);
         }
     }
 }
コード例 #6
0
ファイル: MainPage.g.cs プロジェクト: varshaauti27/WPF
                public void UpdateChildListeners_(global::WiredBrainCoffee.CustomersApp.Model.Customer obj)
                {
                    MainPage_obj6_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        if (bindings.dataRoot != null)
                        {
                            ((global::System.ComponentModel.INotifyPropertyChanged)bindings.dataRoot).PropertyChanged -= PropertyChanged_;
                        }
                        if (obj != null)
                        {
                            bindings.dataRoot = obj;
                            ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_;
                        }
                    }
                }
コード例 #7
0
ファイル: MainPage.g.cs プロジェクト: varshaauti27/WPF
                public void PropertyChanged_ViewModel_SelectedCustomer(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    MainPage_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::WiredBrainCoffee.CustomersApp.Model.Customer obj = sender as global::WiredBrainCoffee.CustomersApp.Model.Customer;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                        }
                        else
                        {
                            switch (propName)
                            {
                            default:
                                break;
                            }
                        }
                    }
                }
コード例 #8
0
ファイル: MainPage.g.cs プロジェクト: varshaauti27/WPF
 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;
 }