Exemple #1
0
        //返回按钮事件
        private void AppViewBackRequestedButton(Object sender, Windows.UI.Core.BackRequestedEventArgs args)
        {
            if (InfoWebView.CanGoBack)
            {
                InfoWebView.GoBack();
            }
            else
            {
                WebView_Grid.Visibility = Visibility.Collapsed;
                Button_Grid.Visibility  = Visibility.Visible;

                HideBackRequestedButton();

                args.Handled = true;
            }
        }
Exemple #2
0
        //按钮响应事件
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button_Grid.Visibility  = Visibility.Collapsed;
            WebView_Grid.Visibility = Visibility.Visible;
            ShowBackRequestedButton();

            Button btn   = (Button)sender;
            String xName = btn.Name.ToString();

            //string strTempUri;
            if (xName == "btn1")
            {
                InfoWebView.Navigate(new Uri(Define.EatUri));
            }
            else if (xName == "btn2")
            {
                InfoWebView.Navigate(new Uri(Define.TotoUri));
            }
            else if (xName == "btn3")
            {
                InfoWebView.Navigate(new Uri(Define.UnusualUri));
            }
            else if (xName == "btn4")
            {
                InfoWebView.Navigate(new Uri(Define.NurseUri));
            }
            else if (xName == "btn5")
            {
                InfoWebView.Navigate(new Uri(Define.SleepUri));
            }
            else if (xName == "btn6")
            {
                InfoWebView.Navigate(new Uri(Define.GrowUri));
            }
            else if (xName == "btn7")
            {
                InfoWebView.Navigate(new Uri(Define.GuardUri));
            }
            else if (xName == "btn8")
            {
                InfoWebView.Navigate(new Uri(Define.PostpartumeUri));
            }
            else
            {
            }
        }