public HangulSpelling()
        {
            this.InitializeComponent();

            WebViewMain.Navigate(new Uri("http://kornorms.korean.go.kr/regltn/regltnView.do"));
            NetworkCheck();
        }
 private void BtnHome_Click(object sender, RoutedEventArgs e)
 {
     if (NetworkCheck() == true)
     {
         WebViewMain.Navigate(new Uri("http://kornorms.korean.go.kr/regltn/regltnView.do"));
         WebViewMain.Visibility   = Visibility.Visible;
         NetNoticeGrid.Visibility = Visibility.Collapsed;
     }
 }
        private void CommandInvokedHandler(IUICommand command)
        {
            var res = ResourceLoader.GetForCurrentView();

            if (command.Label == res.GetString("SPC_Agree"))
            {
                StorageManager.SetSetting<bool>(StorageManager.SpellingCheckerAgreement, true);
                WebViewMain.Navigate(new Uri(SPELLCHECKURL));
                BtnAgree.Visibility = Visibility.Collapsed;
            }
            else if(command.Label == res.GetString("SPC_Disagree"))
            {
                BtnAgree.Visibility = Visibility.Visible;
            }
        }
        private async void WebViewMain_Loaded(object sender, RoutedEventArgs e)
        {
            bool value = StorageManager.GetSetting<bool>(StorageManager.SpellingCheckerAgreement);

            if (value == true)
            {
                WebViewMain.Navigate(new Uri(SPELLCHECKURL));
                NetworkCheck();
            }
            else
            {
                var res = ResourceLoader.GetForCurrentView();
                var messageDialog = new MessageDialog(res.GetString("SPC_DialogText"));

                messageDialog.Commands.Add(new UICommand(res.GetString("SPC_Disagree"), new UICommandInvokedHandler(this.CommandInvokedHandler)));
                messageDialog.Commands.Add(new UICommand(res.GetString("SPC_Agree"), new UICommandInvokedHandler(this.CommandInvokedHandler)));
                messageDialog.DefaultCommandIndex = 1;
                messageDialog.CancelCommandIndex = 0;

                await messageDialog.ShowAsync();
            }
        }
 private void WebViewMain_NewWindowRequested(WebView sender, WebViewNewWindowRequestedEventArgs args)
 {
     WebViewMain.Navigate(args.Uri);
     args.Handled = true;
 }
예제 #6
0
 private void ButtonBackToCommits_Click(object sender, RoutedEventArgs e)
 {
     WebViewMain.Navigate(new Uri("about:blank"));
     _changeContentFrameEvents.ChangeContent(null, null);
 }