本文整理汇总了C#中System.Windows.Forms.WebBrowser.GetHTMLTarget方法的典型用法代码示例。如果您正苦于以下问题:C# WebBrowser.GetHTMLTarget方法的具体用法?C# WebBrowser.GetHTMLTarget怎么用?C# WebBrowser.GetHTMLTarget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.WebBrowser
的用法示例。
在下文中一共展示了WebBrowser.GetHTMLTarget方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplicationContent
public ApplicationContent(
IApp page,
Abstractatech.JavaScript.FileStorage.IApplicationWebServiceX service,
bool DisableBackground = false
)
{
FormStyler.AtFormCreated = FormStylerLikeFloat.LikeFloat;
if (!DisableBackground)
{
#region I want animated background!
WebGLClouds.Application.Loaded +=
a =>
{
Native.Document.body.parentNode.insertBefore(
a.container.Orphanize(),
Native.Document.body
);
a.container.style.position = [email protected];
};
new WebGLClouds.Application();
#endregion
}
//var minsize = new IHTMLDiv().AttachToDocument();
//minsize.style.SetSize(4000, 2000);
var f = new Form
{
Text = "My Files",
StartPosition = FormStartPosition.Manual,
SizeGripStyle = SizeGripStyle.Hide
};
#region w
var ff = new Form
{
StartPosition = FormStartPosition.Manual,
SizeGripStyle = SizeGripStyle.Hide
};
var w = new WebBrowser
{
Dock = DockStyle.Fill
}.AttachTo(ff);
w.GetHTMLTarget().name = "view";
w.Navigating +=
delegate
{
ff.Text = "Navigating";
if (Native.window.Width < 1024)
// docked?
if (ff.GetHTMLTarget().parentNode != null)
Native.window.scrollTo(ff.Left - 8, ff.Top - 8, TimeSpan.FromMilliseconds(300));
};
w.Navigated +=
delegate
{
if (w.Url.ToString() == "about:blank")
{
Native.window.scrollTo(0, 0, TimeSpan.FromMilliseconds(200));
ff.Text = "...";
"Web Files".ToDocumentTitle();
return;
}
//ff.Text = w.DocumentTitle;
ff.Text = Native.window.unescape(
w.Url.ToString().SkipUntilLastIfAny("/").TakeUntilLastIfAny(".")
);
ff.Text.ToDocumentTitle();
};
ff.FormClosing +=
//.........这里部分代码省略.........
示例2: Application
//.........这里部分代码省略.........
var f = new Form
{
StartPosition = FormStartPosition.Manual,
SizeGripStyle = SizeGripStyle.Hide,
Text = "Entries"
};
var f1 = new Form
{
StartPosition = FormStartPosition.Manual,
SizeGripStyle = SizeGripStyle.Hide,
Text = "My Files"
};
f1.Show();
var f2 = new Form
{
StartPosition = FormStartPosition.Manual,
SizeGripStyle = SizeGripStyle.Hide,
Text = "..."
};
f2.Show();
var w = new WebBrowser
{
Dock = DockStyle.Fill
};
w.GetHTMLTarget().name = "viewer";
w.AttachTo(f2);
w.Navigating +=
delegate
{
f2.Text = "Navigating";
};
w.Navigated +=
delegate
{
if (w.Url.ToString() == "about:blank")
{
f2.Text = "...";
return;
}
//ff.Text = w.DocumentTitle;
f2.Text = Native.window.unescape(
w.Url.ToString().SkipUntilLastIfAny("/").TakeUntilLastIfAny(".")
);
};
Native.window.requestAnimationFrame +=
delegate