Exemplo n.º 1
0
        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("所选的工作流在数据库中不存在,请检查!");
            }
        }
Exemplo n.º 2
0
 void RefreshCommands()
 {
     //CloneViewCommand.RaiseCanExecuteChanged();
     DeleteCommand.RaiseCanExecuteChanged();
     MoveDownCommand.RaiseCanExecuteChanged();
     MoveUpCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 3
0
        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));
            }
        }
Exemplo n.º 4
0
 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();
     }
 }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 6
0
 protected override void OnModifiedChange()
 {
     SaveCommand.RaiseCanExecuteChanged();
     CancelCommand.RaiseCanExecuteChanged();
     NewCommand.RaiseCanExecuteChanged();
     DeleteCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 7
0
 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();
 }
Exemplo n.º 8
0
        /// <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();
 }
Exemplo n.º 10
0
 private void RaisCanExecuteChangeHasAnyCustomers()
 {
     UpdateCommand.RaiseCanExecuteChanged();
     DeleteCommand.RaiseCanExecuteChanged();
     ToCsvCommand.RaiseCanExecuteChanged();
     ToJsonCommand.RaiseCanExecuteChanged();
     ToTxtCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 11
0
        public void ReportChange()
        {
            SaveCommand.RaiseCanExecuteChanged();
            DeleteCommand.RaiseCanExecuteChanged();
            RevertCommand.RaiseCanExecuteChanged();

            Notify("HasChanges");
        }
Exemplo n.º 12
0
 protected virtual void RaiseAllCanExecuteChanged()
 {
     SearchCommand.RaiseCanExecuteChanged();
     AddCommand.RaiseCanExecuteChanged();
     DeleteCommand.RaiseCanExecuteChanged();
     SaveCommand.RaiseCanExecuteChanged();
     CancelCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 13
0
 private void RefreshCommands()
 {
     AddCommand.RaiseCanExecuteChanged();
     MoveUpCommand.RaiseCanExecuteChanged();
     MoveDownCommand.RaiseCanExecuteChanged();
     DeleteCommand.RaiseCanExecuteChanged();
     DeleteAllCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 14
0
 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();
 }
Exemplo n.º 16
0
 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();
        }
Exemplo n.º 18
0
 private void RefreshCommands()
 {
     SaveCommand.RaiseCanExecuteChanged();
     CancelCommand.RaiseCanExecuteChanged();
     DeleteCommand.RaiseCanExecuteChanged();
     CreateCommand.RaiseCanExecuteChanged();
     RemoveCommand.RaiseCanExecuteChanged();
     AddCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 19
0
        private async void Init(string ip)
        {
            await Load(null);

            QueryCommand.RaiseCanExecuteChanged();
            AddCommand.RaiseCanExecuteChanged();
            EditCommand.RaiseCanExecuteChanged();
            DeleteCommand.RaiseCanExecuteChanged();
        }
Exemplo n.º 20
0
 public override void RaiseCanExecuteChanges()
 {
     base.RaiseCanExecuteChanges();
     EditCommand.RaiseCanExecuteChanged();
     CopyCommand.RaiseCanExecuteChanged();
     MoveCommand.RaiseCanExecuteChanged();
     NewFolderCommand.RaiseCanExecuteChanged();
     DeleteCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 21
0
 private void ItemPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (FindUnusedAndMissingCommand != null)
     {
         FindUnusedAndMissingCommand.RaiseCanExecuteChanged();
         SortCommand.RaiseCanExecuteChanged();
     }
     ViewComplexObjectsCommand?.RaiseCanExecuteChanged();
     DeleteCommand?.RaiseCanExecuteChanged();
 }
Exemplo n.º 22
0
        protected override void OnChanged()
        {
            base.OnChanged();

            // Refresh commands
            SaveCommand.RaiseCanExecuteChanged();
            SaveAndCloseCommand.RaiseCanExecuteChanged();
            CancelCommand.RaiseCanExecuteChanged();
            DeleteCommand.RaiseCanExecuteChanged();
        }
Exemplo n.º 23
0
 private void raise()
 {
     OnPropertyChanged(() => Message);
     OnPropertyChanged(() => ReportTypesMessage);
     OnPropertyChanged(() => PossibleDesigners);
     OnPropertyChanged(() => ActiveDesigner);
     OnPropertyChanged(() => ScreenState);
     EditCommand.RaiseCanExecuteChanged();
     DeleteCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 24
0
        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();
 }
Exemplo n.º 26
0
 protected void UpdateCrudCommands()
 {
     ExecuteUIThread(() =>
     {
         EditCommand.RaiseCanExecuteChanged();
         SaveCommand.RaiseCanExecuteChanged();
         CancelCommand.RaiseCanExecuteChanged();
         AddCommand.RaiseCanExecuteChanged();
         DeleteCommand.RaiseCanExecuteChanged();
     });
 }
Exemplo n.º 27
0
        public void RemoveUnusedDataListItems()
        {
            _scalarHandler.RemoveUnusedScalars();
            _recordsetHandler.RemoveUnusedRecordSets();
            _complexObjectHandler.RemoveUnusedComplexObjects();

            WriteToResourceModel();
            FindUnusedAndMissingCommand.RaiseCanExecuteChanged();
            ViewComplexObjectsCommand.RaiseCanExecuteChanged();
            DeleteCommand.RaiseCanExecuteChanged();
            UpdateIntellisenseList();
        }
Exemplo n.º 28
0
 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();
 }
Exemplo n.º 30
0
        /// <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();
        }