Example #1
0
 private void Update_ViewModel(global::CourseWork_2.ViewModel.DetailsUserViewModel obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_ViewModel(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_ViewModel_IsOpenCommandBar(obj.IsOpenCommandBar, phase);
         }
         if ((phase & (NOT_PHASED | (1 << 0))) != 0)
         {
             this.Update_ViewModel_AddCommand(obj.AddCommand, phase);
             this.Update_ViewModel_EditCommand(obj.EditCommand, phase);
             this.Update_ViewModel_RemoveCommand(obj.RemoveCommand, phase);
         }
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_ViewModel_UserModel(obj.UserModel, phase);
         }
         if ((phase & (NOT_PHASED | (1 << 0))) != 0)
         {
             this.Update_ViewModel_ResultScreensCommand(obj.ResultScreensCommand, phase);
         }
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_ViewModel_Records(obj.Records, phase);
             this.Update_ViewModel_SelectedItem(obj.SelectedItem, phase);
         }
         if ((phase & (NOT_PHASED | (1 << 0))) != 0)
         {
             this.Update_ViewModel_GoBackCommand(obj.GoBackCommand, phase);
             this.Update_ViewModel_OpenAppBarCommand(obj.OpenAppBarCommand, phase);
         }
     }
 }
Example #2
0
 public void UpdateChildListeners_ViewModel(global::CourseWork_2.ViewModel.DetailsUserViewModel obj)
 {
     if (obj != cache_ViewModel)
     {
         if (cache_ViewModel != null)
         {
             ((global::System.ComponentModel.INotifyPropertyChanged)cache_ViewModel).PropertyChanged -= PropertyChanged_ViewModel;
             cache_ViewModel = null;
         }
         if (obj != null)
         {
             cache_ViewModel = obj;
             ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_ViewModel;
         }
     }
 }
Example #3
0
                public void PropertyChanged_ViewModel(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    DetailsUserPage_obj1_Bindings bindings;

                    if (WeakRefToBindingObj.TryGetTarget(out bindings))
                    {
                        string propName = e.PropertyName;
                        global::CourseWork_2.ViewModel.DetailsUserViewModel obj = sender as global::CourseWork_2.ViewModel.DetailsUserViewModel;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_ViewModel_IsOpenCommandBar(obj.IsOpenCommandBar, DATA_CHANGED);
                                bindings.Update_ViewModel_UserModel(obj.UserModel, DATA_CHANGED);
                                bindings.Update_ViewModel_Records(obj.Records, DATA_CHANGED);
                                bindings.Update_ViewModel_SelectedItem(obj.SelectedItem, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "IsOpenCommandBar":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_ViewModel_IsOpenCommandBar(obj.IsOpenCommandBar, DATA_CHANGED);
                                }
                                break;
                            }

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

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

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

                            default:
                                break;
                            }
                        }
                    }
                }