Esempio n. 1
0
        internal void Application_Startup(object sender, StartupEventArgs e)
        {
            MainWindow main = new MainWindow();

            NavigationService = new PageNavigationService(main.NavigationService);
            main.Show();
            HomePage homePage = new HomePage();

            NavigationService.Navigate(homePage);
        }
Esempio n. 2
0
        public void ShowYouTrackIssuesWindow()
        {
            var window = ShowWindow <YouTrackIssuesWindow>();
            var vm     = _pqFactory.CreateExport().Value;
            var view   = window.Content as IYouTrackIssuesWindowContainer;

            view.DataContext = vm;
            view.Window      = window;
            vm.Initialize();
            _navigationService.ClearNavigationHistory();
            _navigationService.Navigate <IYouTrackIssuesMainView>();
        }
Esempio n. 3
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            MainWindow mainWindow = new MainWindow();

            mainWindow.Show();

            MainFrame      = mainWindow.MainFrame;
            pageNavigation = new PageNavigationService(mainWindow.MainFrame);

            var x = (ViewModelLocator)Current.Resources["ViewModelLocator"];

            mainWindow.DataContext = x.Main;

            pageNavigation.Navigate <MainPage>();
        }
        private void OnSheetParsed(object sender, TimeSheet timeSheet)
        {
            var goBackCommand = new ButtonCommand(_navigationService.GoBack);

            var dateSelectionViewModel = new CompleteInformationViewModel(timeSheet, goBackCommand);

            dateSelectionViewModel.TimeSheetCompleted += (s, ea) =>
            {
                if (ea.DateRange.HasValue)
                {
                    timeSheet.Period = ea.DateRange;
                }
                OnTimeSheetCreated(new TimeSheetCreatedEventArgs(timeSheet, ea.WorkContract));
            };

            _navigationService.Navigate(new CompleteInformationPage(dateSelectionViewModel));
        }
 /// <summary>
 /// Displays the file selection window, beginning the selection flow
 /// </summary>
 /// <param name="navigationService">The navigation service instance</param>
 public void DisplayFileSelection(IPageNavigationService navigationService)
 {
     _navigationService = navigationService;
     navigationService.Navigate(new FileSelectionPage(FileSelectionViewModel));
 }