コード例 #1
0
                public void PropertyChanged_NotesVM(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    MainPage_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::LocalNote.ViewModels.NotesViewModel obj = sender as global::LocalNote.ViewModels.NotesViewModel;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_NotesVM_NoteTitle(obj.NoteTitle, DATA_CHANGED);
                                bindings.Update_NotesVM_Filter(obj.Filter, DATA_CHANGED);
                                bindings.Update_NotesVM_NoteText(obj.NoteText, DATA_CHANGED);
                                bindings.Update_NotesVM_SelectedNote(obj.SelectedNote, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "NoteTitle":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_NotesVM_NoteTitle(obj.NoteTitle, DATA_CHANGED);
                                }
                                break;
                            }

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

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

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

                            default:
                                break;
                            }
                        }
                    }
                }