Exemplo n.º 1
0
        public void ReportChange()
        {
            SaveCommand.RaiseCanExecuteChanged();
            DeleteCommand.RaiseCanExecuteChanged();
            RevertCommand.RaiseCanExecuteChanged();

            Notify("HasChanges");
        }
Exemplo n.º 2
0
 private void ChangeTrackingService_HasChangesChanged(object sender, EventArgs e)
 {
     // let the commands re-evaluate
     SaveCommand.RaiseCanExecuteChanged();
     GetCommand.RaiseCanExecuteChanged();
     RemoveCommand.RaiseCanExecuteChanged();
     RevertCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 3
0
        private void OnSelectedDetailedPersonChanged()
        {
            Notify("HasChanges");

            SaveCommand.RaiseCanExecuteChanged();
            DeleteCommand.RaiseCanExecuteChanged();
            RevertCommand.RaiseCanExecuteChanged();

            SelectedDetailedPerson?.CheckDocuments();
        }
Exemplo n.º 4
0
        private void Revert()
        {
            if (SelectedXmlDependency != null)
            {
                var iEditableObject = SelectedXmlDependency as IEditableObject;
                if (iEditableObject != null)
                {
                    iEditableObject.CancelEdit();

                    // this changes the execution possibility of the revert command...
                    RevertCommand.RaiseCanExecuteChanged();

                    // ... and also _potentially_ changes the other command options
                    SaveCommand.RaiseCanExecuteChanged();
                    GetCommand.RaiseCanExecuteChanged();

                    // finally, publish the selection change event to allow dependent
                    // places to update their values/visual representation
                    PublishSelectedXmlDependencyChangedEvent(SelectedXmlDependency, SelectedXmlDependency);
                }
            }
        }