Exemple #1
0
 private void Update_ViewModel(global::StreamKontrolUnit.ViewModels.InkDrawViewModel obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_ViewModel(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_ViewModel_EnableLassoSelection(obj.EnableLassoSelection, phase);
             this.Update_ViewModel_EnableTouch(obj.EnableTouch, phase);
             this.Update_ViewModel_EnableMouse(obj.EnableMouse, phase);
         }
         if ((phase & (NOT_PHASED | (1 << 0))) != 0)
         {
             this.Update_ViewModel_ZoomInCommand(obj.ZoomInCommand, phase);
             this.Update_ViewModel_ZoomOutCommand(obj.ZoomOutCommand, phase);
             this.Update_ViewModel_CutCommand(obj.CutCommand, phase);
             this.Update_ViewModel_CopyCommand(obj.CopyCommand, phase);
             this.Update_ViewModel_PasteCommand(obj.PasteCommand, phase);
             this.Update_ViewModel_UndoCommand(obj.UndoCommand, phase);
             this.Update_ViewModel_RedoCommand(obj.RedoCommand, phase);
             this.Update_ViewModel_LoadInkFileCommand(obj.LoadInkFileCommand, phase);
             this.Update_ViewModel_SaveInkFileCommand(obj.SaveInkFileCommand, phase);
             this.Update_ViewModel_ExportAsImageCommand(obj.ExportAsImageCommand, phase);
             this.Update_ViewModel_ClearAllCommand(obj.ClearAllCommand, phase);
         }
     }
 }
Exemple #2
0
                public void PropertyChanged_ViewModel(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    InkDrawPage_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::StreamKontrolUnit.ViewModels.InkDrawViewModel obj = sender as global::StreamKontrolUnit.ViewModels.InkDrawViewModel;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_ViewModel_EnableLassoSelection(obj.EnableLassoSelection, DATA_CHANGED);
                                bindings.Update_ViewModel_EnableTouch(obj.EnableTouch, DATA_CHANGED);
                                bindings.Update_ViewModel_EnableMouse(obj.EnableMouse, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "EnableLassoSelection":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_ViewModel_EnableLassoSelection(obj.EnableLassoSelection, DATA_CHANGED);
                                }
                                break;
                            }

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

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

                            default:
                                break;
                            }
                        }
                    }
                }
Exemple #3
0
 public void UpdateChildListeners_ViewModel(global::StreamKontrolUnit.ViewModels.InkDrawViewModel 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;
         }
     }
 }