Beispiel #1
0
 private void OnLoadingChanged(object sender, IsLoadingChangedEventArgs e)
 {
     if (e.IsLoading == true)
     {
         this.InvokeOnUiThreadIfRequired(() => pbWaitIndicator.Visible = true);
     }
     else
     {
         this.InvokeOnUiThreadIfRequired(() => pbWaitIndicator.Visible = false);
     }
 }
Beispiel #2
0
 void browser_IsLoadingChanged(object sender, IsLoadingChangedEventArgs e)
 {
     if (!e.IsLoading)
     {
         if (Browser.Address.ToLower().StartsWith("http://application.globalcaching.eu/tokenresult.aspx"))
         {
             try
             {
                 var task = Browser.EvaluateScriptAsync("getToken()");
                 task.Wait();
                 _token = task.Result.Result as string;
             }
             catch
             {
             }
             this.BeginInvoke(new Action(this.Close));
         }
     }
 }
Beispiel #3
0
        private void SpotifyEnabledBrowser_IsLoadingChanged(object sender, IsLoadingChangedEventArgs e)
        {
            if (!e.IsLoading)
            {
                string css = File.ReadAllText("themes\\" + this.themeFileName);

                css = css.Replace("\r", "").Replace("\n", "").Replace("'", "\"");

                // try and inject the theme CSS
                this.ExecuteScriptAsync(@"var css = '" + css + @"',
                        head = document.getElementsByTagName('head')[0],
                        style = document.createElement('style');

                    style.type = 'text/css';
                    if (style.styleSheet){
                      style.styleSheet.cssText = css;
                    } else {
                      style.appendChild(document.createTextNode(css));
                    }
                    head.appendChild(style);");
            }
        }
 private void OnIsLoadingChanged(object sender, IsLoadingChangedEventArgs args)
 {
     
 }
 private void OnIsLoadingChanged(object sender, IsLoadingChangedEventArgs args)
 {
 }