コード例 #1
0
ファイル: MapWidget.cs プロジェクト: ksued/opencache-manager
 void HandleViewLoadFinished(object o, LoadFinishedArgs args)
 {
     m_Loaded            = true;
     mapProgress.Visible = false;
     foreach (string script in m_PendingActions)
     {
         LoadScript(script);
     }
     m_PendingActions.Clear();
 }
コード例 #2
0
    private void OnLoadFinished(object sender, LoadFinishedArgs args)
    {
        WebView webView = (WebView)sender;

        text_adress.Text = webView.Uri;
        if (text_adress.Text.StartsWith("http://www.youtube.com/watch?") ||
            text_adress.Text.StartsWith("https://www.youtube.com/watch?"))
        {
            button_DownloadVideo.Sensitive   = true;
            button_downloadAudioSq.Sensitive = true;
            button_DownloadHQ.Sensitive      = true;
        }
        else
        {
            button_DownloadVideo.Sensitive   = false;
            button_downloadAudioSq.Sensitive = false;
            button_DownloadHQ.Sensitive      = false;
        }
    }
コード例 #3
0
 private void OnLoadFinished(object o, LoadFinishedArgs args)
 {
     //
 }
コード例 #4
0
        public void OnWindowLoaded(object o, LoadFinishedArgs args)
        {
            if(_wbkt.Uri.Contains("/blank.html"))
                {
                    if(_wbkt.Uri.ToLower().Contains("?error="))
                    {
                        // error string example http://REDIRECT_URI?error=access_denied&error_description=The+user+or+authorization+server+denied+the+request.
                        var errorMessageRegexp = new Regex("error_description=[0-9,a-f]+(&|$)", RegexOptions.CultureInvariant|RegexOptions.IgnoreCase);
                        var errorMessage = errorMessageRegexp.Match(_wbkt.Uri);
                        if( errorMessage.Success)
                        {
                            var message = errorMessage.Value.Substring(18).Replace("&","");
                            //message = (message);
                            message = message.Replace("+", " ");
                            this.throwError(28, "Error while login to vkontakte: " + message);
                        }
                        else
                        {
                            this.throwError(27, "Error while login to vkontakte: " + _wbkt.Uri.ToLower());
                        }
                    }
                    else
                    {

                        var keyRegex = new Regex("access_token=[0-9,a-f]+(&|$)", RegexOptions.CultureInvariant|RegexOptions.IgnoreCase);
                        var userIdRegex = new Regex("user_id=[0-9]+(&|$)", RegexOptions.CultureInvariant|RegexOptions.IgnoreCase);
                        var expirationTimeRegex = new Regex("expires_in=[0-9]+(&|$)", RegexOptions.CultureInvariant|RegexOptions.IgnoreCase);

                        var keyMatch = keyRegex.Match(_wbkt.Uri);
                        var userIdMatch = userIdRegex.Match(_wbkt.Uri);
                        var expirationTimeMatch = expirationTimeRegex.Match(_wbkt.Uri);

                        if(keyMatch.Success && userIdMatch.Success && expirationTimeMatch.Success)
                        {
                            OnKeyReceived(
                                keyMatch.Value.Substring(13).Replace("&",""),
                                userIdMatch.Value.Substring(8).Replace("&",""),
                                Convert.ToInt64(expirationTimeMatch.Value.Substring(11).Replace("&",""))
                                );
                        }
                        else
                        {
                            this.throwError(26, "No authentication keys has been returned");
                        }

                    }
                }
                else if(_wbkt.SearchText("error", false,true, false))
                {
                    // TODO: Add error handling here

                    //_wbkt.SelectAll();
                    //_wbkt.CopyClipboard();

                    this.OnErrorReceived(34, "Unknown error while login to vk.com");
                }
        }
コード例 #5
0
ファイル: FunnyBrowser.cs プロジェクト: shana/webkit-sharp
 private void OnLoadFinished(object o, LoadFinishedArgs args)
 {
     //
 }
コード例 #6
0
 void HandleM_browserLoadFinished(object o, LoadFinishedArgs args)
 {
     m_monitor.SetProgressDone(false);
     loaded = true;
     IEnumerator<string> actions = pending_actions.GetEnumerator();
     while (actions.MoveNext())
         LoadScript(actions.Current);
     pending_actions.Clear();
 }
コード例 #7
0
 void HandleM_viewLoadFinished(object o, LoadFinishedArgs args)
 {
     browserStatus.Push(browserStatus.GetContextId("load"), String.Format("Complete"));
     browserProgress.Hide();
 }
コード例 #8
0
 void HandleM_viewLoadFinished(object o, LoadFinishedArgs args)
 {
     browserStatus.Push(browserStatus.GetContextId("load"), String.Format("Complete"));
     browserProgress.Hide();
 }
コード例 #9
0
 private void OnLoadFinished(object sender,LoadFinishedArgs args)
 {
     WebView webView=(WebView) sender;
     text_adress.Text=webView.Uri;
     if(text_adress.Text.StartsWith("http://www.youtube.com/watch?")||
         text_adress.Text.StartsWith("https://www.youtube.com/watch?"))
     {
         button_DownloadVideo.Sensitive = true;
         button_downloadAudioSq.Sensitive = true;
         button_DownloadHQ.Sensitive = true;
     }
     else{
         button_DownloadVideo.Sensitive = false;
         button_downloadAudioSq.Sensitive = false;
         button_DownloadHQ.Sensitive = false;
         }
 }
コード例 #10
0
 void HandleCacheLogLoadFinished(object o, LoadFinishedArgs args)
 {
     loadProgressBar.Visible = false;
 }
コード例 #11
0
ファイル: Main.cs プロジェクト: mariuz/monobrowser
 private void OnLoadFinished(object o, LoadFinishedArgs args)
 {
     action_stop.Sensitive = false;
 }
コード例 #12
0
 void HandleCacheLogLoadFinished(object o, LoadFinishedArgs args)
 {
     loadProgressBar.Visible = false;
 }