// this includes rollback void _reset() { Events.GetEvent <CategoryViewModelEditCanceledEvent>().Publish(this); IsEditing = false; Committed = true; CancelCommand.RaiseCanExecuteChanged(); }
void ConfigurationPropertyChanged(object sender, PropertyChangedEventArgs e) { switch (e.PropertyName) { case "HasChanges": CommandManager.InvalidateRequerySuggested(); SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); ClearErrorsCommand.RaiseCanExecuteChanged(); if (Configuration.HasChanges) { SaveSuccess = false; } break; case "HasError": CommandManager.InvalidateRequerySuggested(); SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); ClearErrorsCommand.RaiseCanExecuteChanged(); break; default: break; } }
private async void Start() { try { CancellationTokenSource = new CancellationTokenSource(); RunTask = true; StartCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); var tasks = new List <Task>(); tasks.AddRange(new List <Task>() { InitializeProgressBar(ProgressBarOneText, new Progress <int>(p => ProgressBarOneValue = p), CancellationTokenSource.Token), InitializeProgressBar(ProgressBarTwoText, new Progress <int>(p => ProgressBarTwoValue = p), CancellationTokenSource.Token), InitializeProgressBar(ProgressBarThreeText, new Progress <int>(p => ProgressBarThreeValue = p), CancellationTokenSource.Token), }); await Task.WhenAll(tasks); } catch (OperationCanceledException) { } finally { RunTask = false; StartCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); } }
protected override void OnPropertyChanged(string propertyName) { base.OnPropertyChanged(propertyName); if (propertyName == "CanSave") { SaveCommand.RaiseCanExecuteChanged(); } else if (propertyName == "CanCancel") { CancelCommand.RaiseCanExecuteChanged(); } else if (propertyName == "CanDelete") { DeleteCommand.RaiseCanExecuteChanged(); } else if (propertyName == "CanRemove") { RemoveCommand.RaiseCanExecuteChanged(); } else if (propertyName == "CanAddNew") { AddCommand.RaiseCanExecuteChanged(); } else if (propertyName == "IsBusy") { RefreshCommands(); } }
private void InvalidateCommands() { SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); RoleChangedCommand.RaiseCanExecuteChanged(); GenPersonCodeCommand.RaiseCanExecuteChanged(); }
private void ItemPropertyChanged(object sender, PropertyChangedEventArgs e) { _changeProvided = true; Trace.WriteLine("Value of property has changed"); SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); }
private void ButtonUpdate() { AddCommand.RaiseCanExecuteChanged(); ChangeCommand.RaiseCanExecuteChanged(); OkCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); SelectAndChangeCommand.RaiseCanExecuteChanged(); }
protected virtual void RaiseAllCanExecuteChanged() { SearchCommand.RaiseCanExecuteChanged(); AddCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); }
private void OnModelPropertyChanged(object sender, PropertyChangedEventArgs e) { SearchCommand.RaiseCanExecuteChanged(); AddCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); }
public void Done() { _connectedUasManager.Active.Transport.SendMessage(UasCommands.PreflightCalibration(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 0, 0, 0, 2, 0, 0)); BeginCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); DoneCommand.RaiseCanExecuteChanged(); NextCommand.RaiseCanExecuteChanged(); }
private void NotifyCommands() { CancelCommand.RaiseCanExecuteChanged(); CheckoutCommand.RaiseCanExecuteChanged(); PrintCommand.RaiseCanExecuteChanged(); PreviewCommand.RaiseCanExecuteChanged(); SearchProductCommand.RaiseCanExecuteChanged(); }
private void Save() { _fileService.SaveToFile(Users.ToList()); _changeProvided = false; SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); }
private void UpdateCommandsCanExecuteStatus() { CancelCommand.RaiseCanExecuteChanged(); CommitCommand.RaiseCanExecuteChanged(); BeginEditCommand.RaiseCanExecuteChanged(); AddCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); }
private void InvalidateCommands() { SaveCommand.RaiseCanExecuteChanged(); AddProductCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); DeleteProductCommand.RaiseCanExecuteChanged(); FilterCommand.RaiseCanExecuteChanged(); }
private void Cancel() { Loadusers(); _changeProvided = false; SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); }
private void RefreshCommands() { SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); CreateCommand.RaiseCanExecuteChanged(); RemoveCommand.RaiseCanExecuteChanged(); AddCommand.RaiseCanExecuteChanged(); }
void ParentJob_OnTaskState(object sender, TaskStateEventArg e) { if (e.TaskId.JobTaskId == this.TaskID) { this.State = e.NewState; CancelCommand.RaiseCanExecuteChanged(); RequeueCommand.RaiseCanExecuteChanged(); } }
protected override void OnChanged() { base.OnChanged(); // Refresh commands SaveCommand.RaiseCanExecuteChanged(); SaveAndCloseCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); }
private void Remove() { Users.Remove(SelectedUser); _changeProvided = true; SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); }
private void Add() { Users.Add(new User()); _changeProvided = true; SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); }
private async void CancelPressed(object obj) { await Task.Factory.StartNew( () => { _isPressed = true; CancelCommand.RaiseCanExecuteChanged(); ActionText = _cancelText; _cancelCallback?.Invoke(); }); }
private void InvalidateCommands() { SaveCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); PrintCommand.RaiseCanExecuteChanged(); GetAccountCommand.RaiseCanExecuteChanged(); EditOrderItemCommand.RaiseCanExecuteChanged(); DeleteOrderItemCommand.RaiseCanExecuteChanged(); NewOrderItemCommand.RaiseCanExecuteChanged(); }
private void InvalidateCommands() { DeleteEmployeeCommand.RaiseCanExecuteChanged(); EditEmployeeCommand.RaiseCanExecuteChanged(); EditCOACommand.RaiseCanExecuteChanged(); DeleteCOACommand.RaiseCanExecuteChanged(); SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); EditAttributeCommand.RaiseCanExecuteChanged(); DeleteAttributeCommand.RaiseCanExecuteChanged(); }
protected void UpdateCrudCommands() { ExecuteUIThread(() => { EditCommand.RaiseCanExecuteChanged(); SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); AddCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); }); }
private void Cancel() { if (CancellationTokenSource != null) { CancellationTokenSource.Cancel(); } RunTask = false; StartCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); }
public override void AfterItemPermissionsCompleted() { base.AfterItemPermissionsCompleted(); NewCommand.RaiseCanExecuteChanged(); EditCommand.RaiseCanExecuteChanged(); SaveCommand.RaiseCanExecuteChanged(); SearchCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); PrintCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); ExportCommand.RaiseCanExecuteChanged(); }
private void ItemsView_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == nameof(IEditableCollectionView.IsEditingItem) || e.PropertyName == nameof(IEditableCollectionView.IsAddingNew)) { OnPropertyChanged(nameof(IsEditingItem)); CommitCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); ReloadCommand.RaiseCanExecuteChanged(); ToggleEditCommand.RaiseCanExecuteChanged(); } }
/// <summary> /// Rétablit l'état inchangé de l'objet en rejetant les modifications /// </summary> public override void RejectChanges() { base.RejectChanges(); CancelEdit(); BeginEdit(); // Refresh commands SaveCommand.RaiseCanExecuteChanged(); SaveAndCloseCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); }
private void ExecuteCancel(object obj) { foreach (var userRowViewModel in Users) { if (userRowViewModel.HasChanged) { userRowViewModel.CancelChanges(); } } SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); }
private void InvalidateCommands() { SaveCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); PrintCommand.RaiseCanExecuteChanged(); CloseCommand.RaiseCanExecuteChanged(); GetAccountCommand.RaiseCanExecuteChanged(); EditInvoiceItemCommand.RaiseCanExecuteChanged(); DeleteInvoiceItemCommand.RaiseCanExecuteChanged(); NewInvoiceItemCommand.RaiseCanExecuteChanged(); }