private void HandleOpenProjectClicked(object sender, RoutedEventArgs e) { if (_commandService.Get <OpenProjectCommand>().Execute()) { var args = new NavigateToCommand.Args() { currentWindow = this, target = typeof(MainWindow) }; _commandService.Get <NavigateToCommand>().Execute(args); } }
public BootWindow() { InitializeComponent(); _commandService = ServiceLocator.Fetch <CommandService>(); _preferencesService = ServiceLocator.Fetch <PreferencesService>(); if (!_preferencesService.Preferences.LoadLastProjectOnStartUp) { return; } if (_commandService.Get <LoadProjectCommand>().Execute(_preferencesService.Preferences.LastProjectPath)) { var args = new NavigateToCommand.Args() { currentWindow = this, target = typeof(MainWindow) }; _commandService.Get <NavigateToCommand>().Execute(args); } }