本文整理汇总了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);
}
示例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;
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例6: webBrowser_Navigating
void webBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
if (selectButton != null)
{
selectButton.Enabled = false;
}
}
示例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);
}
}
示例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();
}
示例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();
}
}
示例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!"));
}
}
示例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());
}
}
示例12: Browser_Navigating
public void Browser_Navigating(Object b, WebBrowserNavigatingEventArgs x)
{
Core.History("Navigating()");
if (x.Url.ToString() == "about:blank")
{
return;
}
}
示例13: wbRequest_Navigating
private void wbRequest_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
//if (e.Url.ToString().StartsWith(_callbackUrl.ToString()))
//{
// _facebookService.ReceiveRequestData(e.Url);
// Close();
//}
}
示例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());
}
}
示例15: webBrowser1_Navigating
private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
if (!or)
{
e.Cancel = true;
Core.openLink(e.Url.OriginalString);
}
}