public Main(IEventAggregator eventAggregator, IPilotDialogService service, IPilotStorageCommandController pilotStorageCommandController) { _pilotStorageCommandController = pilotStorageCommandController; eventAggregator.Subscribe(this); InitColorScheme(service); Application.Current.Dispatcher.BeginInvoke(new Action(SubscribeHotKey)); }
public MainViewModel(IPilotStorageCommandController pilotStorageCommandController) { _pilotStorageCommandController = pilotStorageCommandController; _editedFiles = new CollectionViewSource { Source = EditedFilesListener.EditedFiles }; _editedFiles.SortDescriptions.Add(new SortDescription(string.Empty, ListSortDirection.Ascending)); EditedFiles.CollectionChanged += OnEditedFilesChanged; _sendToServerCommand = new DelegateCommand.DelegateCommand(SendToServer, CanSend); _sendAllToServerCommand = new DelegateCommand.DelegateCommand(SendAllToServer, CanSendAll); _navigateCommand = new DelegateCommand.DelegateCommand(Navigate, CanNavigate); _openCommand = new DelegateCommand.DelegateCommand(Open, CanOpen); InitializeToolbar(); }