本文整理汇总了C#中IDefault类的典型用法代码示例。如果您正苦于以下问题:C# IDefault类的具体用法?C# IDefault怎么用?C# IDefault使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IDefault类属于命名空间,在下文中一共展示了IDefault类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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(IDefault page)
{
int w = 512;
int h = 512;
page.Content.Clear();
this.c = new IHTMLCanvas();
c.style.border = "1px solid red";
c.width = w;
c.height = h;
c.AttachTo(page.Content);
//this.gl = (ScriptCoreLib.JavaScript.WebGL.WebGLRenderingContext)new IFunction("c", "return c.getContext('experimental-webgl', {depth : false } );").apply(null, c);
// gl = c.getContext("experimental-webgl", {depth : false } );
this.gl = (WebGLRenderingContext)c.getContext("experimental-webgl");
if (gl != null)
{
gl.viewport(0, 0, w, h);
Initialize();
}
}
示例2: 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(IDefault page)
{
@"jsc".ToDocumentTitle();
page.AnimateHomePage();
new ApplicationWebService().WebMethod2(
new XElement(@"Document",
new object[] {
new XElement(@"Data",
new object[] {
@"Hello world"
}
),
new XElement(@"Client",
new object[] {
@"Unchanged text"
}
)
}
),
delegate(XElement doc)
{
doc.Element(@"Data").Value.ToDocumentTitle();
}
);
}
示例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(IDefault page)
{
content.AttachToContainer(page.Content);
content.AutoSizeTo(page.ContentSize);
Native.window.ondeviceorientation +=
(e) =>
{
// x 0..1
// is
// gamma -45 .. 45
// 0..1
// beta -45 .. 45
content.Update(
Math.Max(0, Math.Min(1, (e.gamma + 45) / 90.0)),
Math.Max(0, Math.Min(1, (e.beta + 45) / 90.0))
);
//content.s.Text = new { e.alpha, e.gamma, e.beta }.ToString();
};
@"Hello world".ToDocumentTitle();
// Send data from JavaScript to the server tier
service.WebMethod2(
@"A string from JavaScript.",
value => value.ToDocumentTitle()
);
}
示例4: 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(IDefault page = null)
{
#region await then do InitializeContent
new[]
{
new Data.macbook().Content,
}.ForEach(
(SourceScriptElement, i, MoveNext) =>
{
SourceScriptElement.AttachToDocument().onload +=
delegate
{
MoveNext();
};
}
)(
delegate
{
InitializeContent(page);
}
);
#endregion
style.Content.AttachToHead();
}
示例5: 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(IDefault page = null)
{
#region scripts -> InitializeContent
new[]
{
new global::WebGLPlanetGenerator.Design.sylvester().Content,
new global::WebGLPlanetGenerator.Design.glUtils().Content,
new global::WebGLPlanetGenerator.Design.particle_terrain().Content,
new global::WebGLPlanetGenerator.Design.planet().Content,
}.ForEach(
(SourceScriptElement, i, MoveNext) =>
{
SourceScriptElement.AttachToDocument().onload +=
delegate
{
MoveNext();
};
}
)(
delegate
{
InitializeContent(page);
}
);
#endregion
}
示例6: Application
//public readonly ApplicationWebService service = new ApplicationWebService();
/// <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(IDefault page)
{
#region TheServer
dynamic self = Native.self;
dynamic self_chrome = self.chrome;
object self_chrome_socket = self_chrome.socket;
if (self_chrome_socket != null)
{
chrome.Notification.DefaultTitle = "SinePlasmaApplet";
ChromeTCPServer.TheServer.Invoke(
DefaultSource.Text
);
return;
}
#endregion
// Initialize ApplicationApplet
new ApplicationApplet().AttachAppletToDocument();
//@"Hello world".ToDocumentTitle();
//// Send data from JavaScript to the server tier
//service.WebMethod2(
// @"A string from JavaScript.",
// value => value.ToDocumentTitle()
//);
}
示例7: 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(IDefault page)
{
new IHTMLButton { innerText = "Log in!" }.AttachToDocument().onclick +=
delegate
{
new Cookie("Password").Value = "mypassword";
Native.window.open("/Other", "_self");
};
new IHTMLButton { innerText = "Log Out!" }.AttachToDocument().onclick +=
delegate
{
new Cookie("Password").Value = "";
Native.window.open("/Other", "_self");
};
@"Hello world".ToDocumentTitle();
// Send data from JavaScript to the server tier
service.WebMethod2(
@"A string from JavaScript.",
value => value.ToDocumentTitle()
);
}
示例8: 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(IDefault page)
{
HoverManager m = new HoverManager();
StreamLoremIpsum(Native.Document.body);
new HoverElement("this is a hover text 1", m).AttachTo(Native.Document.body);
StreamLoremIpsum(Native.Document.body);
new HoverElement("this is a hover text 2", m).AttachTo(Native.Document.body);
StreamLoremIpsum(Native.Document.body);
new HoverElement("this is a hover text 3", m).AttachTo(Native.Document.body);
StreamLoremIpsum(Native.Document.body);
@"Hello world".ToDocumentTitle();
// Send data from JavaScript to the server tier
service.WebMethod2(
@"A string from JavaScript.",
value => value.ToDocumentTitle()
);
}
示例9: 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(IDefault page)
{
@"Hello world".ToDocumentTitle();
// Send data from JavaScript to the server tier
service.WebMethod2(
@"A string from JavaScript.",
value => value.ToDocumentTitle()
);
// reference:
// http://apike.ca/prog_svg_basic.html
// http://apike.ca/prog_svg_shapes.html
// http://www.milescript.org/graphicsdemo.html
// http://canarlake.org/index.cgi?theme=svg
// http://srufaculty.sru.edu/david.dailey/svg/SVGAnimations.htm
// http://srufaculty.sru.edu/david.dailey/svg/svg_questions.htm
// http://www.w3.org/TR/2000/CR-SVG-20001102/masking.html#ObjectAndGroupOpacityProperties
// http://jmvidal.cse.sc.edu/talks/canvassvg/gradient.xml?style=White
// http://www.treebuilder.de/default.asp?file=163540.xml
// http://www.ibm.com/developerworks/library/x-svgint/
// http://starkravingfinkle.org/projects/richdraw/richdraw_demo.htm
// http://www.dynamicdrive.com/dynamicindex11/editor.htm
// http://draw.labs.autodesk.com/ADDraw/draw.html
// http://yeonisalive.net/javascript/MindWeb001.php
"h2".AttachToDocument().innerText = "svg + vml example";
if (!ISVGElementBase.Settings.IsSupported)
Native.window.alert("svg not supported in this browser!");
Test1();
Test2();
}
示例10: 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(IDefault page)
{
new gong().AttachToDocument().play();
new ThreeDStuff.js.Tycoon4();
}
示例11: ServicePresenter
public ServicePresenter(IDefault IDefault)
{
if (IDefault != null)
{
objIDefault = IDefault;
}
}
示例12: Init
public void Init(IDefault view, bool postBack)
{
_view = view;
_view.TotalItem = Alert.CountAlertsByAccountID(_accountBeingViewed.AccountID);
ShowDisplay();
}
示例13: 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(IDefault page)
{
// see also: http://neocotic.com/qr.js/
Action<string> Add =
e =>
{
var p = new IHTMLDiv().AttachToDocument();
p.style.margin = "4em";
new IHTMLAnchor
{
href = e,
innerText = e
}.AttachTo(p);
new IHTMLBreak().AttachTo(p);
e.ToQRCode().AttachTo(p);
};
Add("" + Native.document.location);
Add("http://www.jsc-solutions.net");
}
示例14: 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(IDefault page)
{
FormStyler.AtFormCreated = FormStyler.LikeVisualStudioMetro;
FormStyler.AtFormCreated = FormStyler.LikeWindows3;
content.label2.Text = "Open this application from " + Native.Document.location.href;
content.WhenClickedGoFullscreen +=
(b, f) =>
{
var c = global::ScriptCoreLib.JavaScript.Windows.Forms.Extensions.GetHTMLTargetContainer(f);
b.Click +=
delegate
{
c.requestFullscreen();
};
};
var once = false;
content.NewForm +=
f =>
{
if (once)
return;
once = true;
//f.DisableFormClosingHandler = true;
global::CSSMinimizeFormToSidebar.ApplicationExtension.InitializeSidebarBehaviour(
f
);
};
//content.WhenClickedGoFullscreen +=
// (b, f) =>
// {
// var c = global::ScriptCoreLib.JavaScript.Windows.Forms.Extensions.GetHTMLTargetContainer(f);
// b.Click +=
// delegate
// {
// c.requestFullscreen();
// };
// };
//content.AttachControlTo(Native.Document.body);
content.AttachControlTo(page.Content);
content.AutoSizeControlTo(page.ContentSize);
@"Hello world".ToDocumentTitle();
// Send data from JavaScript to the server tier
service.WebMethod2(
@"A string from JavaScript.",
value => value.ToDocumentTitle()
);
}
示例15: 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(IDefault page = null)
{
InitializeContent();
style.Content.AttachToHead();
}