當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.WebBrowserNavigatingEventArgs類代碼示例

本文整理匯總了C#中System.Windows.Forms.WebBrowserNavigatingEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# WebBrowserNavigatingEventArgs類的具體用法?C# WebBrowserNavigatingEventArgs怎麽用?C# WebBrowserNavigatingEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


WebBrowserNavigatingEventArgs類屬於System.Windows.Forms命名空間,在下文中一共展示了WebBrowserNavigatingEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: web_Navigating

        private void web_Navigating( object sender, WebBrowserNavigatingEventArgs e )
        {
            string strUrl = e.Url.ToString();
            string strNo = GetNaviNo(strUrl);

            GotoPage(strNo);
        }
開發者ID:cheng521yun,項目名稱:https---github.com-frontflag-FTMZ_CY,代碼行數:7,代碼來源:Wnd.cs

示例2: c_WebBrowser_Navigating

        /// <summary>
        /// This event is raised when the user has navigated within the web browser.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">The navigation event information.</param>
        private void c_WebBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
        {
            Uri uri = e.Url;

            if (uri.ToString().StartsWith("about:"))
            {
                e.Cancel = true;
                Dictionary<String, String> query = this.GetDictionaryFromQuery(uri.Query);

                switch (uri.LocalPath)
                {
                    case "solution":
                        switch (query["mode"])
                        {
                            case "new":
                                // Call the "New Solution" menu option.
                                new Platform.Menus.Definitions.Solution.New().OnActivate();
                                break;
                            case "open":
                                // Call the "Open Solution" menu option.
                                new Platform.Menus.Definitions.Solution.Open().OnActivate();
                                break;
                        }
                        break;
                    case "tutorial":
                        MessageBox.Show(
                            "The selected tutorial is currently unavailable.",
                            "Tutorial Unavailable",
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Error);
                        break;
                }
            }
        }
開發者ID:rudybear,項目名稱:moai-ide,代碼行數:39,代碼來源:Designer.cs

示例3: browser_Navigating

 private void browser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
 {
     if (!pageLoaded) return;
     string url = e.Url.ToString();
     Process.Start(url);
     e.Cancel = true;
 }
開發者ID:spncrgr,項目名稱:connector-idea,代碼行數:7,代碼來源:About.cs

示例4: webBrowser1_Navigating

 void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
 {
     btnReloadCancel.Image = (Image)Properties.Resources.cross;
     pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
     pictureBox1.Image = (Image)Properties.Resources.loadingAnimation;
     loading = true;
 }
開發者ID:DeepBlue42,項目名稱:AlwaysOnTopBrowser,代碼行數:7,代碼來源:Form1.cs

示例5: OnSipRequest

        protected virtual void OnSipRequest(WebBrowserNavigatingEventArgs e)
        {
            SipRequestArgs srArgs = new SipRequestArgs();
            srArgs.Command = e.Url.Host.ToString();

            string original = e.Url.PathAndQuery.ToString();
            original = original.Replace("&hash;", "#");
            string[] swp = original.Split('?');
            if (swp.Length == 1) {
                //no arguments
                srArgs.Command = original;
            } else {
                srArgs.Command = swp[0];
                foreach (string kvpair in swp[1].Split('&')) {
                    swp = kvpair.Split('=');
                    string key = swp[0].ToLower();
                    string val="";
                    if (swp.Length > 1) {
                        //argument with no value
                        val = Uri.UnescapeDataString(swp[1]);
                    }
                    srArgs.Arguments.Add(key, val);
                }
            }
            MySipRequest(this, srArgs);
            e.Cancel = srArgs.Cancel;
        }
開發者ID:raffaeleguidi,項目名稱:Click2Phone,代碼行數:27,代碼來源:SipAwareBrowser.cs

示例6: webBrowser_Navigating

 void webBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
 {
     if (selectButton != null)
     {
         selectButton.Enabled = false;
     }
 }
開發者ID:gahadzikwa,項目名稱:GAPP,代碼行數:7,代碼來源:BrowserScriptSelectGeocache.cs

示例7: webBrowser_Navigating

        private void webBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
        {
            if (initializing)
                return;

            e.Cancel = true;

            string url = e.Url.OriginalString;

            // this is not abstracted away as long as we have only a very limited number of functionalities:
            if (url != null && url.StartsWith(XCNS, StringComparison.InvariantCultureIgnoreCase))
            {
                if (url.Contains("HelpContents"))
                {
                    XenAdmin.Help.HelpManager.Launch(null);
                }
                else if (url.Contains("AddServer"))
                {
                    new AddHostCommand(Program.MainWindow, this).Execute();
                }
            }
            else
            {
                Program.OpenURL(url);
            }
        }
開發者ID:robhoes,項目名稱:xenadmin,代碼行數:26,代碼來源:HomePage.cs

示例8: DoScreenshot

    /// <summary>
    /// This method creates a new form with a webbrowser of correct size on it,
    /// to make a fullsize website screenhot.
    /// </summary>
    /// <param name="navigatingArgs">The <see cref="WebBrowserNavigatingEventArgs"/> instance containing the event data,
    /// especially the url.</param>
    /// <param name="filename">The filename to save the screenshot to.</param>
    public static void DoScreenshot(WebBrowserNavigatingEventArgs navigatingArgs, string filename)
    {
      newTargetUrl = navigatingArgs.Url;
      newScreenshotFilename = filename;

      var tempBrowser = new WebBrowser();
      var dummyForm = new Form { ClientSize = new Size(1, 1), FormBorderStyle = FormBorderStyle.None };
      dummyForm.ShowInTaskbar = false;
      dummyForm.Controls.Add(tempBrowser);
      dummyForm.Show();
      tempBrowser.ScrollBarsEnabled = true;
      tempBrowser.ScriptErrorsSuppressed = true;
      tempBrowser.DocumentCompleted += WebBrowserDocumentCompleted;

      if (navigatingArgs.TargetFrameName != string.Empty)
      {
        tempBrowser.Navigate(navigatingArgs.Url, navigatingArgs.TargetFrameName);
      }
      else
      {
        tempBrowser.Navigate(newTargetUrl);
      }

      while (tempBrowser.ReadyState != WebBrowserReadyState.Complete)
      {
        Application.DoEvents();
      }

      tempBrowser.Dispose();
    }
開發者ID:DeSciL,項目名稱:Ogama,代碼行數:37,代碼來源:WebsiteScreenshot.cs

示例9: br_Navigating

        void br_Navigating(object sender, WebBrowserNavigatingEventArgs e)
        {
            if (e.Url.AbsoluteUri.StartsWith(endLink))
            {
                // parse result
                string urlEnd = e.Url.ToString().Split('#')[1];
                Dictionary<string, string> values = new Dictionary<string, string>();
                string[] nameValues = urlEnd.Split(new[] { "&" }, StringSplitOptions.RemoveEmptyEntries);
                foreach (var nameValue in nameValues)
                {
                    // Separate this values by '=' so you get name/key and value as separated field in array
                    string[] temp = nameValue.Split(new[] { "=" }, StringSplitOptions.RemoveEmptyEntries);

                    if (temp.Length == 2)
                    {
                        values.Add(temp[0], WebUtility.UrlDecode(temp[1]));
                    }
                }

                Token = new TokenResult();
                Token.AccessToken = values["access_token"];
                Token.InstanceUrl = values["instance_url"];
                Token.RefreshToken = values["refresh_token"];

                // close window
                this.Close();
            }
        }
開發者ID:DemosAndTrials,項目名稱:DemoWebBrowserInClassLibrary,代碼行數:28,代碼來源:WebForm.cs

示例10: webBrowser_Navigating

 private void webBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e) {
     if (e.Url.Host.Equals("gap.exec")) {
         e.Cancel = true;
         String res = commandManager.processInstruction(e.Url.AbsolutePath);
         webBrowser.Navigate(new Uri("javascript:" + res + ";abc.x=1;//JS error!"));
     }
 }
開發者ID:RobIncAMDSPhD,項目名稱:phonegap,代碼行數:7,代碼來源:WebForm.cs

示例11: helpBrowser_Navigating

 private void helpBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
 {
     if (e.Url.Host.Length != 0)
     {
         e.Cancel = true;
         Process.Start(e.Url.ToString());
     }
 }
開發者ID:AHorak,項目名稱:vs-window-title-changer,代碼行數:8,代碼來源:TitleSetupEditorHelp.cs

示例12: Browser_Navigating

 public void Browser_Navigating(Object b, WebBrowserNavigatingEventArgs x)
 {
     Core.History("Navigating()");
     if (x.Url.ToString() == "about:blank")
     {
         return;
     }
 }
開發者ID:justinwillcott,項目名稱:huggle,代碼行數:8,代碼來源:SpecialBrowser.cs

示例13: wbRequest_Navigating

 private void wbRequest_Navigating(object sender, WebBrowserNavigatingEventArgs e)
 {
     //if (e.Url.ToString().StartsWith(_callbackUrl.ToString()))
     //{
     //    _facebookService.ReceiveRequestData(e.Url);
     //    Close();
     //}
 }
開發者ID:jeffdeville,項目名稱:FacebookDeveloperToolkit---Fork-at-37335,代碼行數:8,代碼來源:RequestSelection.cs

示例14: webHelp_Navigating

 private void webHelp_Navigating(object sender, WebBrowserNavigatingEventArgs e)
 {
     if (e.Url.ToString() != helpFile)
     {
         e.Cancel = true;
         System.Diagnostics.Process.Start(e.Url.ToString());
     }
 }
開發者ID:awesomist,項目名稱:mcsLaunch,代碼行數:8,代碼來源:HelpForm.cs

示例15: webBrowser1_Navigating

 private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
 {
     if (!or)
     {
         e.Cancel = true;
         Core.openLink(e.Url.OriginalString);
     }
 }
開發者ID:jariz,項目名稱:EasyCapture,代碼行數:8,代碼來源:About.cs


注:本文中的System.Windows.Forms.WebBrowserNavigatingEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。