Ejemplo n.º 1
0
 public void showAnaPage()
 {
     NavFrame.Dispatcher.Invoke((Action)(() => {
         AnalysPage = new AnalysePage(this);
         NavFrame.Navigate(AnalysPage);
     }));
 }
Ejemplo n.º 2
0
 private void OnBackRequested()
 {
     if (NavFrame.CanGoBack)
     {
         NavFrame.GoBack();
     }
 }
Ejemplo n.º 3
0
 public void showIDInputPage(char channel)
 {
     NavFrame.Navigate(idInputPage);
     idInputPage.Channel             = channel;
     idInputPage.chan1patientID.Text = "";
     idInputPage.chan1materID.Text   = "";
 }
Ejemplo n.º 4
0
        private void NavView_OnSelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
                NavFrame.Navigate(typeof(SettingsPage));
            }
            else
            {
                var selectedItem = (args.SelectedItem as NavigationViewItem)?.Content;
                switch (selectedItem)
                {
                case "Home":
                    NavFrame.Navigate(typeof(GalleryPage));
                    break;

                case "Dates":
                    NavFrame.Navigate(typeof(DatesPage));
                    break;

                case "Places":
                    NavFrame.Navigate(typeof(PlacesPage));
                    break;

                case "Tags":
                    NavFrame.Navigate(typeof(TagsPage));
                    break;

                default:
                    Debug.WriteLine("NotImplementedException: " + selectedItem);
                    break;
                }
            }
        }
Ejemplo n.º 5
0
 public MainWindow()
 {
     InitializeComponent();
     SizeToContent = SizeToContent.WidthAndHeight;
     ResizeMode    = ResizeMode.NoResize;
     NavFrame.NavigationUIVisibility = NavigationUIVisibility.Hidden;
     NavFrame.Navigate(new ProyectoOracle.Vistas.Menu(this));
 }
 public MainPage()
 {
     this.InitializeComponent();
     //NavFrame.Navigate(typeof(RestCall));
     //NavFrame.Navigate(typeof(LocalData));
     //NavFrame.Navigate(typeof(Threading));
     NavFrame.Navigate(typeof(SqliteConnection));
 }
Ejemplo n.º 7
0
        private async Task GoBackWithTransition()
        {
            if (NavFrame.Content is IExitTransition page)
            {
                await page.PlayExitTransition();
            }

            NavFrame.GoBack(new SuppressNavigationTransitionInfo());
        }
Ejemplo n.º 8
0
        public Recon()
        {
            //this loads the mainpage and the whole appliation from there
            InitializeComponent();
            NavFrame.Navigate(new MainPage());

            ////////////////////////////////////////
            ///                                  ///
        }   ///        Do not delete this!       ///
Ejemplo n.º 9
0
        private void AutoSuggestBox_OnQuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
        {
            var queryStr = sender.Text;

            if (queryStr != "" && queryStr != "No results")
            {
                NavFrame.Navigate(typeof(SearchPage), queryStr);
            }
        }
Ejemplo n.º 10
0
        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
        }
Ejemplo n.º 11
0
        public void Startup()
        {
            HelixGenModel theModel = ((HelixGen.App)(App.Current)).Model;

            theModel.initializationProgress += TheModel_initializationProgress;
            NavFrame.Navigate(startupPage);
            Thread.Sleep(0);

            NavFrame.LoadCompleted += NavFrame_Startup_Navigated;
        }
Ejemplo n.º 12
0
        public MainWindow()
        {
            Contexto = new ContextoServicio(UrlFox);
            Sesion   = new Sesion();

            InitializeComponent();
            SizeToContent = SizeToContent.WidthAndHeight;
            ResizeMode    = ResizeMode.NoResize;

            NavFrame.NavigationUIVisibility = NavigationUIVisibility.Hidden;

            NavFrame.Navigate(new InicioSesion(this));
        }
Ejemplo n.º 13
0
 public void navigateTo(Type pageType, Object payload = null)
 {
     if (NavFrame.BackStack.Count > 0)
     {
         NavFrame.BackStack.RemoveAt(0);
     }
     if (payload == null)
     {
         NavFrame.Navigate(pageType);
         return;
     }
     NavFrame.Navigate(pageType, payload);
 }
Ejemplo n.º 14
0
        private async Task NavigateWithTransition(Type sourcePageType, object parameter)
        {
            if (_categorySelectorView != null)
            {
                _ = HideCategorySelector();
            }
            if (_purchaseView != null)
            {
                _ = HidePurchaseForm();
            }
            if (NavFrame.Content is IExitTransition page)
            {
                await page.PlayExitTransition();
            }

            NavFrame.Navigate(sourcePageType, parameter, new SuppressNavigationTransitionInfo());
        }
Ejemplo n.º 15
0
 public void RefreshPage()
 {
     NavFrame.Refresh();
 }
Ejemplo n.º 16
0
 void OnGoBack(object Sender, RoutedEventArgs E)
 {
     NavFrame.GoBack();
 }
Ejemplo n.º 17
0
 private void BtnRefresh_Click(object sender, RoutedEventArgs e)
 {
     NavFrame.Refresh();
 }
Ejemplo n.º 18
0
 private void LightCommandsButton_Click(object sender, RoutedEventArgs e)
 {
     NavFrame.Navigate(typeof(LightCommandsPage));
 }
Ejemplo n.º 19
0
 private void EntertainmentButton_Click(object sender, RoutedEventArgs e)
 {
     NavFrame.Navigate(typeof(EntertainmentSetup));
 }
Ejemplo n.º 20
0
 private void RegisterButton_Click(object sender, RoutedEventArgs e)
 {
     NavFrame.Navigate(typeof(RegisterPage));
 }
Ejemplo n.º 21
0
 private void FindLightsButton_Click(object sender, RoutedEventArgs e)
 {
     NavFrame.Navigate(typeof(FindLightsPage));
 }
Ejemplo n.º 22
0
 void OnGoNext(object Sender, RoutedEventArgs E)
 {
     NavFrame.GoForward();
 }
Ejemplo n.º 23
0
 private void LocateBridgeButton_Click(object sender, RoutedEventArgs e)
 {
     NavFrame.Navigate(typeof(LocateBridgePage));
 }
Ejemplo n.º 24
0
 private void ControlsButton_Click_1(object sender, RoutedEventArgs e)
 {
     NavFrame.Navigate(typeof(ControlsExamplePage));
 }
Ejemplo n.º 25
0
 private void ParallaxButton_Click_1(object sender, RoutedEventArgs e)
 {
     NavFrame.Navigate(typeof(ParallaxPage));
 }
Ejemplo n.º 26
0
 private void UtilButton_Click_1(object sender, RoutedEventArgs e)
 {
     NavFrame.Navigate(typeof(UtilExamplePage));
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Invoked when this page is about to be displayed in a Frame.
 /// </summary>
 /// <param name="e">Event data that describes how this page was reached.  The Parameter
 /// property is typically used to configure the page.</param>
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     NavFrame.Navigate(typeof(FindingBridgePage));
 }
Ejemplo n.º 28
0
        private async void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                _ = await StorageFolder.GetFolderFromPathAsync("C:\\");
            }
            catch (UnauthorizedAccessException)
            {
                ContentDialog Dialog = new ContentDialog
                {
                    Title             = "提示",
                    Content           = "请开启此应用的文件系统访问权限以正常工作\r\r然后重新启动该应用",
                    PrimaryButtonText = "导航至权限页",
                    CloseButtonText   = "关闭应用",
                    Background        = Application.Current.Resources["DialogAcrylicBrush"] as Brush
                };
                switch (await Dialog.ShowAsync())
                {
                case ContentDialogResult.Primary:
                    await Launcher.LaunchUriAsync(new Uri("ms-settings:appsfeatures-app"));

                    ToastContent Content = new ToastContent()
                    {
                        Scenario = ToastScenario.Reminder,

                        Visual = new ToastVisual()
                        {
                            BindingGeneric = new ToastBindingGeneric()
                            {
                                Children =
                                {
                                    new AdaptiveText()
                                    {
                                        Text = "正在等待用户完成操作..."
                                    },

                                    new AdaptiveText()
                                    {
                                        Text = "请开启文件系统权限"
                                    },

                                    new AdaptiveText()
                                    {
                                        Text = "随后点击下方的立即启动"
                                    }
                                }
                            }
                        },

                        Actions = new ToastActionsCustom
                        {
                            Buttons =
                            {
                                new ToastButton("立即启动", "Restart")
                                {
                                    ActivationType = ToastActivationType.Foreground
                                },
                                new ToastButtonDismiss("稍后")
                            }
                        }
                    };
                    ToastNotificationManager.CreateToastNotifier().Show(new ToastNotification(Content.GetXml()));
                    Application.Current.Exit();
                    break;

                default:
                    Application.Current.Exit();
                    break;
                }
                return;
            }


            var View = ApplicationView.GetForCurrentView();

            if (ApplicationData.Current.LocalSettings.Values["EnableScreenCapture"] is bool Enable)
            {
                View.IsScreenCaptureEnabled = Enable;
            }
            else
            {
                View.IsScreenCaptureEnabled = false;
                ApplicationData.Current.LocalSettings.Values["EnableScreenCapture"] = false;
            }

            if (ApplicationData.Current.LocalSettings.Values["EmailProtectionMode"] == null && await KeyCredentialManager.IsSupportedAsync())
            {
                ApplicationData.Current.LocalSettings.Values["EmailProtectionMode"] = true;
            }

            if (ApplicationData.Current.LocalSettings.Values["UseInsideWebBrowser"] == null)
            {
                ApplicationData.Current.LocalSettings.Values["UseInsideWebBrowser"] = true;
            }

            PageDictionary = new Dictionary <Type, string>()
            {
                { typeof(HomePage), "首页" },
                { typeof(MusicPage), "音乐" },
                { typeof(VoiceRec), "语音识别" },
                { typeof(WebTab), "网页浏览" },
                { typeof(Cosmetics), "智能美妆" },
                { typeof(About), "关于" },
                { typeof(ChangeLog), "关于" },
                { typeof(USBControl), "USB管理" },
                { typeof(EmailPage), "邮件" },
                { typeof(CodeScanner), "QR识别" }
            };

            if (ApplicationData.Current.LocalSettings.Values["USBActivateRequest"] is bool IsUSB && IsUSB)
            {
                ApplicationData.Current.LocalSettings.Values["USBActivateRequest"] = null;
                NavigationView.SelectedItem = NavigationView.MenuItems[5] as NavigationViewItemBase;
                NavFrame.Navigate(typeof(USBControl), NavFrame);
            }
Ejemplo n.º 29
0
 public void GoTo(Page pagina)
 {
     NavFrame.Navigate(pagina);
 }
Ejemplo n.º 30
0
 public void Back()
 {
     NavFrame.GoBack();
 }