private void WelcomeConfirm(object sender, RoutedEventArgs e) { AppStateManager.RootDirectory = FileName.Text; var data = new DirectoryPageData() { Directory = FileName.Text }; this.NavigationService.Navigate(new DirectoryPage(data)); }
public MainWindow() { StateManager.Initialize(); InitializeComponent(); Page page; switch (AppStateManager.AppState) { case AppState.Welcomed: var directoryData = new DirectoryPageData() { Directory = AppStateManager.RootDirectory }; page = new DirectoryPage(directoryData); break; case AppState.Directed: var enlistmentsData = new EnlistmentsPageData() { Directory = AppStateManager.RootDirectory, DirectoryIncludeList = AppStateManager.DirectoryIncludeList }; page = new EnlistmentsPage(enlistmentsData); break; case AppState.BrandNew: page = new WelcomePage(); break; default: AppStateManager.AppState = AppState.BrandNew; page = new WelcomePage(); break; } mainFrame.Navigate(page); }