internal OutputExtension() { _lignes = new ObservableCollection <string>(); BindingOperations.EnableCollectionSynchronization(_lignes, _lockLines); _clearCommand = new CommandWithCanExecute(Properties.Resources.ClearCommand, Clear, CanClear); _lignes.CollectionChanged += _lignes_CollectionChanged; }
public DesignerViewModel() { #region Préparation du designer // Enregistrment des meta WF pour utiliser le designer new DesignerMetadata().Register(); InitilizeDesigner(); // Créer une zone de travail _designer.Load(new ActivityBuilder { Name = "Designer" }); // Création de la toolbox _toolbox = new ToolboxControl(); // Activité de base // AddToToolbox("Built In WF", typeof(Sequence).Assembly); ToolboxHelper.AddAll(_toolbox); _output = new OutputExtension(); #endregion #region Préparation des commandes _openCommand = new Command(Properties.Resources.OpenCommand, Open); _saveCommand = new Command(Properties.Resources.SaveCommand, Save); _saveAsCommand = new Command(Properties.Resources.SaveAsCommand, SaveAs); _newActivityCommand = new Command(Properties.Resources.NewActivityCommand, NewActivity); _newServiceCommand = new Command(Properties.Resources.NewServiceCommand, NewService); _executeCommand = new CommandWithCanExecute(Properties.Resources.ExecuteCommand, Execute, CanExecute); _executeSlowCommand = new CommandWithCanExecute(Properties.Resources.ExecuteSlowCommand, ExecuteSlow, CanExecute); _stopCommand = new CommandWithCanExecute(Properties.Resources.StopCommand, Stop, CanStop); #endregion }