public void showAnaPage() { NavFrame.Dispatcher.Invoke((Action)(() => { AnalysPage = new AnalysePage(this); NavFrame.Navigate(AnalysPage); })); }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { HelixGenModel theModel = ((HelixGen.App)(App.Current)).Model; theModel.initializationProgress += TheModel_initializationProgress; // Show the version. Version thisVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; tbVersion.Text = string.Format("CopyRight To Helixgen,Version: {0}.{1}", thisVersion.Major.ToString(), thisVersion.Minor.ToString()); // showMainPage(); //AnalysPage = new AnalysePage(this); startupPage = new StartupPage(theModel); setUpPage = new setUp(this); idInputPage = new IDInput(this); Loginpage = new loginPage(this); AnalysPage = new AnalysePage(this); runResultPage = new RunResultPage(this); //_mainPage = new MainPage(this); NavFrame.Navigate(Loginpage); /* * StartupPage startupPage = new StartupPage(theModel); * * NavFrame.Navigate(startupPage); * Thread.Sleep(0); * * NavFrame.LoadCompleted += NavFrame_Startup_Navigated; */ #if false OpticsControlPage opticsPage = new OpticsControlPage(); NavFrame.Navigate(opticsPage); opticsPage.Initialize(); #endif #if false Thread.Sleep(10000); Task.Factory.StartNew(() => { Application.Current.Dispatcher.Invoke( delegate { showMainPage(); } ); } ); #endif }