/// <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);
 }
 /// <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);
 }