当前位置: 首页>>代码示例>>C#>>正文


C# System.Windows.Forms.WebBrowser.Navigate方法代码示例

本文整理汇总了C#中System.Windows.Forms.WebBrowser.Navigate方法的典型用法代码示例。如果您正苦于以下问题:C# System.Windows.Forms.WebBrowser.Navigate方法的具体用法?C# System.Windows.Forms.WebBrowser.Navigate怎么用?C# System.Windows.Forms.WebBrowser.Navigate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.WebBrowser的用法示例。


在下文中一共展示了System.Windows.Forms.WebBrowser.Navigate方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Init

        public static void Init()
        {
            webBrowser = new System.Windows.Forms.WebBrowser();

            var document = DynamicTableJavascript.Document;

            webBrowser.Navigate("about:blank");
            webBrowser.Document.Write(document);
        }
开发者ID:v0dka,项目名称:SharpSoundPlugins,代码行数:9,代码来源:DynamicTable.cs

示例2: TryLogin

        public override void TryLogin(string UserId, SecureString Password)
        {
            this.UserId = UserId;
            this.Password = Password;
            if (UserId.Length == 0 || Password.Length == 0) {
                OnCompleted(LoginCode.WRONG_USER, string.Empty, UserId);
                return;
            }

            LoginAttemptNum = 0;
            if (Browser != null)
                Browser.Dispose();
            Browser = new System.Windows.Forms.WebBrowser() {
                ScriptErrorsSuppressed = true
            };
            Browser.DocumentCompleted += LoginDocumentCompleted;
            Browser.Navigate("http://member.imbc.com/Login/Login.aspx");
            OnStateChanged(LoginState.LOGINNING);
        }
开发者ID:GoldRenard,项目名称:DMOAdvancedLauncher,代码行数:19,代码来源:KoreaIMBCLoginProvider.cs

示例3: WindowLoaded

        /// <summary>
        /// Handles the Loaded event of the Window control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void WindowLoaded(object sender, RoutedEventArgs e)
        {
            if (AeroGlassCompositionEnabled)
            {
                ExcludeElementFromAeroGlass(border);
                SetAeroGlassTransparency();
            }

            Title           = "Login to {0}".FormatWith((string)Engine.Name);
            urlTextBox.Text = Engine.Site;
            favicon.Source  = new BitmapImage(new Uri("http://getfavicon.appspot.com/http://{0}/".FormatWith(new Uri(Engine.Site).DnsSafeHost)));

            _webBrowser = new WebBrowser { ScriptErrorsSuppressed = true };
            _webBrowser.DocumentCompleted += WebBrowserDocumentCompleted;
            winFormsHost.Child = _webBrowser;

            _webBrowser.Navigate(Engine.Site);

            Utils.Win7Taskbar(state: TaskbarProgressBarState.Indeterminate);
        }
开发者ID:chiranjeevjain,项目名称:RS-TV-Show-Tracker,代码行数:25,代码来源:CookieCatcherWindow.xaml.cs

示例4: AnalyticsTracking

        private void AnalyticsTracking()
        {
            if (this.DoNotTrack())
              {
            return;
              }

              var id = this.GetId();
              var ver = ApplicationManager.AppVersion.EmptyToNull() ?? "dev";

              this.Dispatcher.Invoke(new Action(() =>
              {
            try
            {
              var wb = new System.Windows.Forms.WebBrowser
              {
            ScriptErrorsSuppressed = true
              };

              var url = string.Format("https://bitbucket.org/alienlab/sitecore-instance-manager/wiki/Tracking?version={0}&id={1}", ver, id);

              wb.Navigate(url, null, null, "User-Agent: Sitecore Instance Manager");
            }
            catch (Exception ex)
            {
              Log.Error("Failed to update statistics internal identifier", this, ex);
            }
              }));
        }
开发者ID:Brad-Christie,项目名称:Sitecore-Instance-Manager,代码行数:29,代码来源:MainWindow.xaml.cs

示例5: GetValue

 private void GetValue(string productLink)
 {
     webBrowser = new System.Windows.Forms.WebBrowser {AllowNavigation = true};
     webBrowser.DocumentCompleted += b_DocumentCompleted;
     webBrowser.Navigate(productLink);
 }
开发者ID:monkieboy,项目名称:ShopNaija,代码行数:6,代码来源:DPScraperImplementation.cs

示例6: webBrowser_Navigated

 private void webBrowser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
 {
     FacebookOAuthResult oauthResult;
     if (_fb.TryParseOAuthCallbackUrl(e.Uri, out oauthResult))
     {
         FacebookOAuthResult = oauthResult;
         this.Close();
     }
     else if (e.Uri.AbsoluteUri.StartsWith("https://www.facebook.com/connect/login_success.html"))
     {
         // the last try on XP
         shadowBrowser = new System.Windows.Forms.WebBrowser();
         shadowBrowser.Navigated += shadowBrowser_Navigated;
         shadowBrowser.Navigate(_loginUrl);
     }
     else
     {
         FacebookOAuthResult = null;
     }
 }
开发者ID:ummterry,项目名称:Clipoff,代码行数:20,代码来源:FacebookLoginDialog.xaml.cs

示例7: SendSolderModVersion

        //Sends a modversion to the specified mod at the solder website
        public static void SendSolderModVersion(string solderUrl, string email, string password, string id, string version)
        {
            using (CookieAwareWebClient client = GetAuthenticatedWebClient(solderUrl, email, password)) {
                string getURL = solderUrl + "post.php?id=" + id + "&version=" + version;
                var cookies = client.CookieContainer.GetCookies(new Uri(solderUrl.Substring(0, solderUrl.Length - 1)));

                System.Windows.Forms.WebBrowser browser = new System.Windows.Forms.WebBrowser();
                browser.Navigate(getURL, "", null, "Cookie: " + cookies[0].Value + Environment.NewLine + "Cookie: " + cookies[1].Value + Environment.NewLine);
            }
        }
开发者ID:Wicloz,项目名称:Welder,代码行数:11,代码来源:MiscFunctions.cs

示例8: openBrowser

        private void openBrowser(Uri url)
        {
            //SystemWindow browser = new SystemWindow(600,600);

            System.Windows.Forms.Form test = new System.Windows.Forms.Form();
            test.Icon = new System.Drawing.Icon(Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "application.ico"));
            test.Height = 480;
            test.Width = 640;
            test.Text = "MatterControl";

            browser = new System.Windows.Forms.WebBrowser();
            browser.DocumentCompleted += browser_DocumentCompleted;
            browser.Navigate(url);
            browser.Dock = System.Windows.Forms.DockStyle.Fill;

            test.Controls.Add(browser);
            test.Show();
            //browser.AddChild(br);
            //browser.ShowAsSystemWindow();
        }
开发者ID:klewisjohnson,项目名称:MatterControl,代码行数:20,代码来源:AboutPage.cs

示例9: btn_baidu_login_Click

        private void btn_baidu_login_Click(object sender, RoutedEventArgs a)
        {
            var b = new System.Windows.Forms.WebBrowser();
            b.Width = 800;
            b.Height = 600;
            b.AllowNavigation = true;
            var w = new System.Windows.Window();
            b.Navigated += (s, e) =>
            {
                try
                {
                    var m = new Regex("access_token=(.*?)&").Match(e.Url.ToString());
                    if (m.Success)
                    {
                        Global.AppSettings["baidu_access_token"] = m.Groups[1].Value;
                        w.Close();
                    }
                    else
                    {
                    }
                }
                catch (Exception ex)
                {
                    Logger.Error(ex);
                }

            };
            b.Navigate(new PCS_client().GetAccessTokenPage());
            var h = new System.Windows.Forms.Integration.WindowsFormsHost();
            h.Child = b;
            w.Content = h;
            w.ShowDialog();
        }
开发者ID:akakoori,项目名称:xiami_downloader,代码行数:33,代码来源:ConfigPage.xaml.cs


注:本文中的System.Windows.Forms.WebBrowser.Navigate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。