public OutputViewModel(DefaultWorkspace workspace, IOutputToolboxToolbarService outputToolbox, ICommandManager commandManager, IEventAggregator eventAggregator, IOutputService outputService) : base(outputToolbox) { IsValidationEnabled = false; _outputToolbox = outputToolbox; _eventAggregator = eventAggregator; _commandManager = commandManager; _outputService = outputService; _outputSource = new Dictionary <string, string>(); _outputSource[DefaultOutputSource] = string.Empty; CurrentOutputContext = DefaultOutputSource; OutputSourceRefresh(); Name = "Output"; Title = "Output"; ContentId = "Output";//TODO : Move to constants IsVisible = false; _view = new OutputUserControl(this); View = _view; _eventAggregator.GetEvent <LogOutputEvent>().Subscribe(AddLog); _eventAggregator.GetEvent <OutputSourceAddedEvent>().Subscribe(OutputSourceAddedEvent); _eventAggregator.GetEvent <OutputSourceRemovedEvent>().Subscribe(OutputSourceRemovedEvent); _eventAggregator.GetEvent <OutputSourceChangedEvent>().Subscribe(OutputSourceChangedEvent); }
public void Initialize() { _eventAggregator.GetEvent <SplashScreenUpdateEvent>().Publish(new SplashScreenUpdateEvent { Text = "Loading Output Module" }); _container.RegisterType <OutputViewModel>(); _container.RegisterType <IOutputToolboxToolbarService, OutputToolboxToolbarService>(new ContainerControlledLifetimeManager()); IWorkspace workspace = _container.Resolve <DefaultWorkspace>(); _outputViewModel = _container.Resolve <OutputViewModel>(); _outputToolbarService = _container.Resolve <IOutputToolboxToolbarService>(); LoadCommands(); LoadToolbar(); workspace.Tools.Add(_outputViewModel); }