public void OpenWorkflow(int workflowID) { Workflow = SystemService.GetDynObjectByID("Workflow", workflowID); if (Workflow != null) { _designer = new WorkflowDesigner(); _undoEngine = _designer.Context.Services.GetService <UndoEngine>(); _undoEngine.UndoUnitAdded += delegate(object ss, UndoUnitEventArgs ee) { _designer.Flush(); CanUndo = true; }; DesignerView = _designer.View; PropertyContent = _designer.PropertyInspectorView; _designer.Text = Workflow["Definition"].ToString(); _designer.Load(); WorkflowName = Workflow["WorkflowName"].ToString(); EditState = "modify"; CanUndo = false; CanRedo = false; DeleteCommand.RaiseCanExecuteChanged(); } else { MessageBox.Show("所选的工作流在数据库中不存在,请检查!"); } }
void RefreshCommands() { //CloneViewCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); MoveDownCommand.RaiseCanExecuteChanged(); MoveUpCommand.RaiseCanExecuteChanged(); }
public void OnPropertyChanged(string propertyName, object before, object after) { if (propertyName == nameof(SelectedIdol)) { SendToSlotCommand.RaiseCanExecuteChanged(); CopyIidCommand.RaiseCanExecuteChanged(); } else if (propertyName == nameof(UnitName)) { SaveCommand.RaiseCanExecuteChanged(); } else if (propertyName == nameof(SelectedUnit)) { if (SelectedUnit != null) { TemporalUnit.CopyFrom(SelectedUnit); } DeleteCommand.RaiseCanExecuteChanged(); } if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } }
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 SaveCompleted(ObservableCollection <TblStoreCommission> Result, Exception Error) { if (Error != null) { MessageBox.Show(Helper.GetInnerExceptionMessage(Error)); Loading = false; return; } else { MessageBox.Show(strings.SavedMessage); } foreach (var item in Result) { TblStoreCommission savedRow = new TblStoreCommission(); //if (outindex >= 0 && MainRowList.Count > outindex) // savedRow = MainRowList.ElementAt(outindex); savedRow = MainRowList.FirstOrDefault(s => s.Tblstore == item.Tblstore); if (savedRow != null) { savedRow.InjectFrom(Result); savedRow.TblStore1 = StoreList.FirstOrDefault(b => b.iserial == savedRow.Tblstore); } } DeleteCommand.RaiseCanExecuteChanged(); IsNewChanged(); Loading = false; }
protected override void OnModifiedChange() { SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); NewCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); }
private void Files_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { if (e.NewItems != null) { foreach (var item in e.NewItems) { if (item is FileViewModel fvm) { OpenDirectoryCommand.CanExecuteDependsOn(fvm, nameof(fvm.IsSelected)); DeleteCommand.CanExecuteDependsOn(fvm, nameof(fvm.IsSelected)); RenameCommand.CanExecuteDependsOn(fvm, nameof(fvm.IsSelected)); } } } if (e.OldItems != null) { foreach (var item in e.OldItems) { if (item is FileViewModel fvm) { OpenDirectoryCommand.RemoveCanExecuteDependency(fvm, nameof(fvm.IsSelected)); DeleteCommand.RemoveCanExecuteDependency(fvm, nameof(fvm.IsSelected)); RenameCommand.RemoveCanExecuteDependency(fvm, nameof(fvm.IsSelected)); } } } OpenDirectoryCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); RenameCommand.RaiseCanExecuteChanged(); }
/// <summary> /// Déclenche l'événement <see cref="ModeChanged"/> /// </summary> protected virtual void OnModeChanged(Mode previousMode) { switch (Mode) { case Mode.None: break; case Mode.New: ViewUriIcon = (string.IsNullOrEmpty(ViewUriIconNew)) ? Resources.UriIcon_ViewNew : ViewUriIconNew; break; case Mode.Edit: ViewUriIcon = (string.IsNullOrEmpty(ViewUriIconEdit)) ? Resources.UriIcon_ViewEdit : ViewUriIconEdit; break; case Mode.Delete: break; } // Refresh commands DeleteCommand.RaiseCanExecuteChanged(); if (ModeChanged != null) { ModeChanged(this, new ModeChangedEventArgs(previousMode)); } }
private void NotifyCommands() { EditCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); PrintCommand.RaiseCanExecuteChanged(); PreviewCommand.RaiseCanExecuteChanged(); PaymentsCommand.RaiseCanExecuteChanged(); }
private void RaisCanExecuteChangeHasAnyCustomers() { UpdateCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); ToCsvCommand.RaiseCanExecuteChanged(); ToJsonCommand.RaiseCanExecuteChanged(); ToTxtCommand.RaiseCanExecuteChanged(); }
public void ReportChange() { SaveCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); RevertCommand.RaiseCanExecuteChanged(); Notify("HasChanges"); }
protected virtual void RaiseAllCanExecuteChanged() { SearchCommand.RaiseCanExecuteChanged(); AddCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); }
private void RefreshCommands() { AddCommand.RaiseCanExecuteChanged(); MoveUpCommand.RaiseCanExecuteChanged(); MoveDownCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); DeleteAllCommand.RaiseCanExecuteChanged(); }
private void UpdateCommandsCanExecuteStatus() { CancelCommand.RaiseCanExecuteChanged(); CommitCommand.RaiseCanExecuteChanged(); BeginEditCommand.RaiseCanExecuteChanged(); AddCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); }
protected virtual void RaiseCanExecuteEvents() { MessageCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); ReadCommand.RaiseCanExecuteChanged(); ChangeCategoryCommand.RaiseCanExecuteChanged(); FollowUpCommand.RaiseCanExecuteChanged(); }
private void OnModelPropertyChanged(object sender, PropertyChangedEventArgs e) { SearchCommand.RaiseCanExecuteChanged(); AddCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); }
protected override void OnPropertyChanged(string propertyName) { base.OnPropertyChanged(propertyName); UploadTemplateCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); SaveCommand.RaiseCanExecuteChanged(); }
private void RefreshCommands() { SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); CreateCommand.RaiseCanExecuteChanged(); RemoveCommand.RaiseCanExecuteChanged(); AddCommand.RaiseCanExecuteChanged(); }
private async void Init(string ip) { await Load(null); QueryCommand.RaiseCanExecuteChanged(); AddCommand.RaiseCanExecuteChanged(); EditCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); }
public override void RaiseCanExecuteChanges() { base.RaiseCanExecuteChanges(); EditCommand.RaiseCanExecuteChanged(); CopyCommand.RaiseCanExecuteChanged(); MoveCommand.RaiseCanExecuteChanged(); NewFolderCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); }
private void ItemPropertyChanged(object sender, PropertyChangedEventArgs e) { if (FindUnusedAndMissingCommand != null) { FindUnusedAndMissingCommand.RaiseCanExecuteChanged(); SortCommand.RaiseCanExecuteChanged(); } ViewComplexObjectsCommand?.RaiseCanExecuteChanged(); DeleteCommand?.RaiseCanExecuteChanged(); }
protected override void OnChanged() { base.OnChanged(); // Refresh commands SaveCommand.RaiseCanExecuteChanged(); SaveAndCloseCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); }
private void raise() { OnPropertyChanged(() => Message); OnPropertyChanged(() => ReportTypesMessage); OnPropertyChanged(() => PossibleDesigners); OnPropertyChanged(() => ActiveDesigner); OnPropertyChanged(() => ScreenState); EditCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); }
private void OnSelectedDetailedPersonChanged() { Notify("HasChanges"); SaveCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); RevertCommand.RaiseCanExecuteChanged(); SelectedDetailedPerson?.CheckDocuments(); }
private void InvalidateCommands() { SaveCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); PrintCommand.RaiseCanExecuteChanged(); GetAccountCommand.RaiseCanExecuteChanged(); EditOrderItemCommand.RaiseCanExecuteChanged(); DeleteOrderItemCommand.RaiseCanExecuteChanged(); NewOrderItemCommand.RaiseCanExecuteChanged(); }
protected void UpdateCrudCommands() { ExecuteUIThread(() => { EditCommand.RaiseCanExecuteChanged(); SaveCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); AddCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); }); }
public void RemoveUnusedDataListItems() { _scalarHandler.RemoveUnusedScalars(); _recordsetHandler.RemoveUnusedRecordSets(); _complexObjectHandler.RemoveUnusedComplexObjects(); WriteToResourceModel(); FindUnusedAndMissingCommand.RaiseCanExecuteChanged(); ViewComplexObjectsCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); UpdateIntellisenseList(); }
public override void AfterItemPermissionsCompleted() { base.AfterItemPermissionsCompleted(); NewCommand.RaiseCanExecuteChanged(); EditCommand.RaiseCanExecuteChanged(); SaveCommand.RaiseCanExecuteChanged(); SearchCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); PrintCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); ExportCommand.RaiseCanExecuteChanged(); }
private void InvalidateCommands() { SaveCommand.RaiseCanExecuteChanged(); DeleteCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); PrintCommand.RaiseCanExecuteChanged(); CloseCommand.RaiseCanExecuteChanged(); GetAccountCommand.RaiseCanExecuteChanged(); EditInvoiceItemCommand.RaiseCanExecuteChanged(); DeleteInvoiceItemCommand.RaiseCanExecuteChanged(); NewInvoiceItemCommand.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(); }