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

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::LocalNote.ViewModels.NoteViewModel obj = sender as global::LocalNote.ViewModels.NoteViewModel;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_NoteViewModel_NoteTitle(obj.NoteTitle, DATA_CHANGED);
                                bindings.Update_NoteViewModel_Filter(obj.Filter, DATA_CHANGED);
                                bindings.Update_NoteViewModel_SelectedNote(obj.SelectedNote, DATA_CHANGED);
                                bindings.Update_NoteViewModel_NoteContent(obj.NoteContent, DATA_CHANGED);
                                bindings.Update_NoteViewModel_ReadOnly(obj.ReadOnly, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "NoteTitle":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_NoteViewModel_NoteTitle(obj.NoteTitle, DATA_CHANGED);
                                }
                                break;
                            }

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

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

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

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

                            default:
                                break;
                            }
                        }
                    }
                }