コード例 #1
0
 /// <summary>
 /// Called when the web browser form is shown.
 /// </summary>
 /// <param name="sender">Sender of the event.</param>
 /// <param name="e">The event arguments.</param>
 private void WebBrowserForm_Shown(object sender, EventArgs e)
 {
     closed = false;
     if (loaderPath == null)
     {
         loaderPath = LoaderFileUtil.WriteLoaderHtmlToTempFile();
     }
     chromiumWebBrowser.Load(loaderPath);
     initialPageLoadStarted = false;
     chromiumWebBrowser.LoadingStateChanged += chromiumWebBrowser_LoadingStateChanged;
     chromiumWebBrowser.RequestHandler       = new AuthzRequestHandler(this);
 }
コード例 #2
0
 /// <summary>
 /// Called when the web browser window is shown.
 /// </summary>
 /// <param name="sender">Sender of the event.</param>
 /// <param name="e">The event arguments.</param>
 private void windowWebBrowser_Loaded(object sender, RoutedEventArgs e)
 {
     closed = false;
     if (loaderPath == null)
     {
         loaderPath = LoaderFileUtil.WriteLoaderHtmlToTempFile();
     }
     ChromiumWebBrowser = new ChromiumWebBrowser
     {
         Address        = loaderPath,
         RequestHandler = new AuthzRequestHandler(this)
     };
     initialPageLoadStarted = false;
     ChromiumWebBrowser.LoadingStateChanged += ChromiumWebBrowser_LoadingStateChanged;
     gridForWebBrowser.Children.Add(ChromiumWebBrowser);
 }