protected override void Initialize() { base.Initialize(); FactonizeCommand.Initialize(this); GoToModuleCommand.Initialize(this); GoToConfigCommand.Initialize(this); GoToProvidedConfigCommand.Initialize(this); this.dte = (DTE)this.GetService(typeof(DTE)); this.AdviseSolutionEvents(); ModuleToolWindowCommand.Initialize(this); FactonizeCtorsCommand.Initialize(this); AddInheritDocCommand.Initialize(this); SolutionExplorerCommands.InheritDocInSolutionExplorerCommand.Initialize(this); SolutionExplorerCommands.FactonizeInSolutionExplorerCommand.Initialize(this); SolutionExplorerCommands.FactonizeCtorsInSolutionExplorerCommand.Initialize(this); SolutionExplorerCommands.DeleteBinFolderCommand.Initialize(this); SolutionExplorerCommands.BuildFacton7DebugCommand.Initialize(this); SolutionExplorerCommands.GetBuildFacton7DebugCommand.Initialize(this); SolutionExplorerCommands.SolutionFolderDeleteBinFoldersCommand.Initialize(this); SolutionExplorerCommands.FactonizeEverythingInProjectCommand.Initialize(this); SolutionExplorerCommands.FactonizeEverythingInSolutionFolderCommand.Initialize(this); SolutionExplorerCommands.FactonizePendingChangesInProjectCommand.Initialize(this); SolutionExplorerCommands.FactonizePendingChangesInFolderSolutionCommand.Initialize(this); UpdateConfigCommand.Initialize(this); CreateServiceVariableCommand.Initialize(this); }
//Подписка на модель с данными о количестве и процентном соотношении лицензий public void notify() { HandModifiedDataState result = handModifiedDataModel.getResult(); ModelingConfig config = model.getConfig(); config.UnicSoftwareNames = result.unicSoftwareNames; config.NumberOfPurcharedLicenses = result.numberOfPurcharedLicenses; config.Percents = result.percents; config.NotifyObservers = false; UpdateConfigCommand <ModelingReport, ModelingConfig> command = new UpdateConfigCommand <ModelingReport, ModelingConfig>(model, config); command.execute(); //commandsStore.executeCommand( // new UpdateConfigCommand<ModelingReport, ModelingConfig>(model, config)); }
public Task Handle(UpdateConfigCommand message, CancellationToken cancellationToken) { if (!message.IsValid()) { NotifyValidationErrors(message); return(Task.CompletedTask); } var Config = new Config(message.Id, message.SystemEnable, message.Currency, message.ReferalBonus); _ConfigRepository.Update(Config); if (Commit()) { Bus.RaiseEvent(new ConfigUpdatedEvent(Config.Id, Config.SystemEnable, Config.Currency, Config.ReferalBonus)); } return(Task.CompletedTask); }