示例#1
0
                public void PropertyChanged_ViewModel(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    SeriesPage_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::MVVMcomics.ViewModels.SeriesViewModel obj = sender as global::MVVMcomics.ViewModels.SeriesViewModel;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_ViewModel_Source(obj.Source, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "Source":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_ViewModel_Source(obj.Source, DATA_CHANGED);
                                }
                                break;
                            }

                            default:
                                break;
                            }
                        }
                    }
                }
示例#2
0
 public void UpdateChildListeners_ViewModel(global::MVVMcomics.ViewModels.SeriesViewModel 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;
         }
     }
 }
示例#3
0
 private void Update_ViewModel(global::MVVMcomics.ViewModels.SeriesViewModel obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_ViewModel(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_ViewModel_Source(obj.Source, phase);
         }
         if ((phase & (NOT_PHASED | (1 << 0))) != 0)
         {
             this.Update_ViewModel_IssueClickCommand(obj.IssueClickCommand, phase);
             this.Update_ViewModel_SelectedSeries(obj.SelectedSeries, phase);
         }
     }
 }