示例#1
0
 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);
     }
 }
示例#2
0
        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);
            }
        }