Esempio n. 1
0
 private void Update_MainVm(global::SmartSounder.ViewModel.MainViewModel obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_MainVm(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_MainVm_Text(obj.Text, phase);
             this.Update_MainVm_StatusColor(obj.StatusColor, phase);
             this.Update_MainVm_SpeechStatus(obj.SpeechStatus, phase);
             this.Update_MainVm_CommandRecStatus(obj.CommandRecStatus, phase);
             this.Update_MainVm_LogStr(obj.LogStr, phase);
         }
     }
 }
Esempio n. 2
0
 public void UpdateChildListeners_MainVm(global::SmartSounder.ViewModel.MainViewModel obj)
 {
     if (obj != cache_MainVm)
     {
         if (cache_MainVm != null)
         {
             ((global::System.ComponentModel.INotifyPropertyChanged)cache_MainVm).PropertyChanged -= PropertyChanged_MainVm;
             cache_MainVm = null;
         }
         if (obj != null)
         {
             cache_MainVm = obj;
             ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_MainVm;
         }
     }
 }
Esempio n. 3
0
                public void PropertyChanged_MainVm(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    MainPage_obj1_Bindings bindings;

                    if (WeakRefToBindingObj.TryGetTarget(out bindings))
                    {
                        string propName = e.PropertyName;
                        global::SmartSounder.ViewModel.MainViewModel obj = sender as global::SmartSounder.ViewModel.MainViewModel;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_MainVm_Text(obj.Text, DATA_CHANGED);
                                bindings.Update_MainVm_StatusColor(obj.StatusColor, DATA_CHANGED);
                                bindings.Update_MainVm_SpeechStatus(obj.SpeechStatus, DATA_CHANGED);
                                bindings.Update_MainVm_CommandRecStatus(obj.CommandRecStatus, DATA_CHANGED);
                                bindings.Update_MainVm_LogStr(obj.LogStr, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "Text":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_MainVm_Text(obj.Text, DATA_CHANGED);
                                }
                                break;
                            }

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

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

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

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

                            default:
                                break;
                            }
                        }
                    }
                }