本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
}));
}
示例5: GetValue
private void GetValue(string productLink)
{
webBrowser = new System.Windows.Forms.WebBrowser {AllowNavigation = true};
webBrowser.DocumentCompleted += b_DocumentCompleted;
webBrowser.Navigate(productLink);
}
示例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;
}
}
示例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);
}
}
示例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();
}
示例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();
}