本文整理汇总了C#中Form1.GetHTMLTarget方法的典型用法代码示例。如果您正苦于以下问题:C# Form1.GetHTMLTarget方法的具体用法?C# Form1.GetHTMLTarget怎么用?C# Form1.GetHTMLTarget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form1
的用法示例。
在下文中一共展示了Form1.GetHTMLTarget方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeContent
//.........这里部分代码省略.........
f.Width * zoom,
f.Height * zoom,
10,
//0,
-f.Right * zoom, f.Top * zoom,
0 - f.Z * zoom + zz,
//-250,
0, 0, 0);
}
);
}
};
CreateFromFloorplan();
//zz += 300;
//CreateFromFloorplan();
#endregion
//avoid out of memory - elements will go missing
//zz += 300;
//CreateFromFloorplan();
c.GetHTMLTarget().className = "nolock";
c.button1.Click +=
delegate
{
var cf = new Form1();
cf.Show();
cf.FormClosing +=
(ss, ee) =>
{
if (cf.WindowState == FormWindowState.Normal)
{
if (ee.CloseReason == CloseReason.UserClosing)
{
ee.Cancel = true;
cf.WindowState = FormWindowState.Minimized;
}
}
};
cf.GetHTMLTarget().className = "nolock";
};
c.button2.Click +=
delegate
{
var cf = new Form();
var cw = new WebBrowser { Dock = DockStyle.Fill };
示例2: InitializeContent
// dynamic does not work in static yet?
//static
void InitializeContent()
{
// script: error JSC1000: Method: InitializeContent, Type: CSSTransform3DFPSExperimentByKeith.Application; emmiting failed : System.InvalidOperationException: unsupported flow detected, try to simplify.
// Assembly V:\CSSTransform3DFPSExperimentByKeith.Application.exe
// DeclaringType CSSTransform3DFPSExperimentByKeith.Application, CSSTransform3DFPSExperimentByKeith.Application, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null
// OwnerMethod InitializeContent
// Offset 00a0
// .Try ommiting the return, break or continue instruction.
// at jsc.Script.CompilerBase.BreakToDebugger(String e) in x:\jsc.internal.svn\compiler\jsc\Languages\CompilerBase.cs:line 266
// at jsc.ILBlock.PrestatementBlock.AddPrestatement(Prestatement p) in x:\jsc.internal.svn\compiler\jsc\CodeModel\ILBlock.cs:line 1654
// at jsc.ILBlock.PrestatementBlock.Populate(ILInstruction First, ILInstruction Last) in x:\jsc.internal.svn\compiler\jsc\CodeModel\ILBlock.cs:line 1606
// at jsc.ILBlock.PrestatementBlock.Populate() in x:\jsc.internal.svn\compiler\jsc\CodeModel\ILBlock.cs:line 1433
// at jsc.ILBlock.get_Prestatements() in x:\jsc.internal.svn\compiler\jsc\CodeModel\ILBlock.cs:line 1759
// at jsc.Languages.JavaScript.MethodBodyOptimizer.TryOptimize(IdentWriter w, ILBlock xb) in x:\jsc.internal.svn\compiler\jsc\Languages\JavaScript\MethodBodyOptimizer.cs:line 89
// at jsc.IL2Script.EmitBody(IdentWriter w, MethodBase SourceMethod, Boolean define_self) in x:\jsc.internal.svn\compiler\jsc\Languages\JavaScript\IL2Script.cs:line 576
//Unhandled Exception: System.InvalidOperationException: Method: InitializeContent, Type: CSSTransform3DFPSExperimentByKeith.Application; emmiting failed : System.InvalidOperationException: unsupported flow detected, try to simplify.
//dynamic window = Native.Window;
//dynamic __osxPlane = window.__osxPlane;
//IHTMLDiv __osxPlane_node = __osxPlane.node;
var discover = new IHTMLIFrame
{
//border = "0",
src = "http://discover.xavalon.net",
allowFullScreen = true,
frameBorder = "0"
};
//discover.style.transform = "scale(0.5)";
//discover.style.transformOrigin = "0% 0%";
//var scale = 1.25;
var scale = 1;
var zoom = 8;
discover.style.transform = "scale(" + (1 / scale) + ")";
discover.style.transformOrigin = "0% 0%";
discover.style.SetSize(
(int)(__wall_c.clientWidth * zoom * scale),
(int)(__wall_c.clientHeight * zoom * scale)
);
//dynamic ds = discover.style;
//ds.zoom = (100.0 / zoom) + "%";
discover.AttachTo(__wall_c);
var c = new Controls.UserControl1();
c.GetHTMLTarget().className = "nolock";
#region button1
c.button1.Click +=
delegate
{
var cf = new Form1();
cf.Show();
cf.FormClosing +=
(ss, ee) =>
{
if (cf.WindowState == FormWindowState.Normal)
{
if (ee.CloseReason == CloseReason.UserClosing)
{
ee.Cancel = true;
cf.WindowState = FormWindowState.Minimized;
}
}
};
cf.GetHTMLTarget().className = "nolock";
};
#endregion
#region button2
c.button2.Click +=
delegate
{
var cf = new Form();
var cw = new WebBrowser { Dock = DockStyle.Fill };
cf.Controls.Add(cw);
cw.Navigate(
"http://discover.xavalon.net"
//.........这里部分代码省略.........
示例3: Application
/// <summary>
/// This is a javascript application.
/// </summary>
/// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
public Application(IApp page)
{
// what about webrtc?
content.BackColor = Color.Transparent;
if (Native.window.opener != null)
{
content.button1.Enabled = false;
content.button1.Text = "we are the secondary screen!";
return;
}
var flocal = new Form1();
flocal.Show();
flocal.webBrowser1.Navigate("/jsc");
content.button1.Click +=
delegate
{
content.button1.Enabled = false;
int c = -1;
Native.window.open("/", "_blank").With(
w =>
{
w.onload +=
delegate
{
c++;
if (c == 0)
{
}
else if (c == 1)
{
// we need the secondary load?
w.document.title = "secondary screen";
w.document.body.style.backgroundColor = JSColor.Yellow;
var fremote = new Form1 { Text = "(Remote)" };
fremote.webBrowser1.Navigate("/jsc");
fremote.Show();
fremote.GetHTMLTarget().AttachTo(
w.document.body
);
fremote.Opacity = 0.5;
var shadow = new IHTMLDiv();
shadow.style.SetLocation(
32, 32, 200,
200
);
shadow.style.backgroundColor = JSColor.Yellow;
shadow.style.Opacity = 0.5;
shadow.AttachToDocument();
#region update
Action update =
delegate
{
dynamic xwlocal = Native.window;
int xwlocal_left = xwlocal.screenLeft;
int xwlocal_top = xwlocal.screenTop;
int xwlocal_innerHeight = xwlocal.innerHeight;
int xwlocal_outerHeight = xwlocal.outerHeight;
int xwlocal_innerWidth = xwlocal.innerWidth;
int xwlocal_outerWidth = xwlocal.outerWidth;
dynamic xw = w;
int xw_left = xw.screenLeft;
int xw_top = xw.screenTop;
int xw_innerHeight = xw.innerHeight;
int xw_outerHeight = xw.outerHeight;
int xw_innerWidth = xw.innerWidth;
int xw_outerWidth = xw.outerWidth;
//.........这里部分代码省略.........
示例4: InitializeContent
//.........这里部分代码省略.........
world.addPlane(new Plane(colour, w, d, x, y, z, 90, 0, 0));
world.addPlane(new Plane(colour, d, h, x, y, z, 0, 270, 0));
world.addPlane(new Plane(colour, d, h, x + w, y, z + d, 0, 90, 0));
world.addPlane(new Plane(colour, w, d, x + w, y + h, z, 90, 180, 0));
world.addPlane(new Plane(colour, w, h, x, y, z + d, 0, 0, 0));
};
buildCube0("url(assets/CSSTransform3DFPSExperiment/desk.jpg)", 10, 50, 300, -150 + 400, 345, -250, 0, 0, 0);
for (int xi = 0; xi < 20; xi++)
{
buildCube("url(assets/CSSTransform3DFPSExperiment/desk.jpg)", 10, 50, 300, -150 + 400, 345 + 60 * xi, -250, 0, 0, 0);
}
new Plane(
"url(assets/CSSTransform3DFPSExperiment/wood.jpg)", 800, 800, -400 + 800, 400, 53, 180, 0, 0
).With(
pp =>
{
world.addPlane(pp);
pp.position.x += 20;
//pp.rotation.z += 15;
pp.update();
}
);
c.GetHTMLTarget().className = "nolock";
c.button1.Click +=
delegate
{
var cf = new Form1();
cf.Show();
cf.FormClosing +=
(ss, ee) =>
{
if (cf.WindowState == FormWindowState.Normal)
{
if (ee.CloseReason == CloseReason.UserClosing)
{
ee.Cancel = true;
cf.WindowState = FormWindowState.Minimized;
}
}
};
cf.GetHTMLTarget().className = "nolock";
};
c.button2.Click +=
delegate
{
var cf = new Form();
var cw = new WebBrowser { Dock = DockStyle.Fill };