private void WebView_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e)
 {
     if (e.IsSuccess)
     {
         System.Diagnostics.Debug.Print("WebView is ready for native window.");
     }
     this.WebView.CoreWebView2.NavigationStarting  += CoreWebView2_NavigationStarting;
     this.WebView.CoreWebView2.NavigationCompleted += CoreWebView2_NavigationCompleted;
 }
Пример #2
0
 private void MBrowser_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e)
 {
     LocalServer.Start(mDispatcher, (string error) =>
     {
         if (error != null)
         {
             MessageBox.Show(error, "Error", MessageBoxButtons.OK);
             Close();
         }
         else
         {
             mBrowser.CoreWebView2.Navigate("http://localhost:9999/index.html");
         }
     });
 }
Пример #3
0
        private async void WebView21_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e)
        {
            PrintOutput("CoreWebView2InitializationCompleted");

            webView21.CoreWebView2.NavigationCompleted      += CoreWebView2_NavigationCompleted;
            webView21.CoreWebView2.FrameNavigationCompleted += CoreWebView2_FrameNavigationCompleted;
            webView21.CoreWebView2.NewWindowRequested       += CoreWebView2_NewWindowRequested;

            //
            string script_id = await webView21.CoreWebView2.AddScriptToExecuteOnDocumentCreatedAsync(Resources.systemjs);

            PrintOutput($"AddScriptToExecuteOnDocumentCreatedAsync Completed, ScriptID: {script_id}");
        }
Пример #4
0
 private void WebBrowser_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e)
 {
     WebBrowser.CoreWebView2.DocumentTitleChanged += CoreWebView2_DocumentTitleChanged;
 }
Пример #5
0
 private void WebView_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e)
 {
     btivm.CompleteNewTabInitialize(this.WebView.CoreWebView2);
     this.WebView.CoreWebView2.NewWindowRequested   += CoreWebView2_NewWindowRequested;
     this.WebView.CoreWebView2.DocumentTitleChanged += CoreWebView2_DocumentTitleChanged;
 }
Пример #6
0
 private void WebView2_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e)
 {
     textStatusWebView2.Text = "WebView_CoreWebView2InitializationCompleted";
 }