• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IDefault类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IDefault的典型用法代码示例。如果您正苦于以下问题:C# IDefault类的具体用法?C# IDefault怎么用?C# IDefault使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IDefault类属于命名空间,在下文中一共展示了IDefault类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
            }
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:30,代码来源:Application.cs


示例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();
                }
            );
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:31,代码来源:Application.cs


示例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()
            );
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:35,代码来源:Application.cs


示例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();
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:31,代码来源:Application.cs


示例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

     
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:32,代码来源:Application.cs


示例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()
            //);
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:34,代码来源:Application.cs


示例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()
            );
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:31,代码来源:Application.cs


示例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()
            );
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:32,代码来源:Application.cs


示例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();

        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:39,代码来源:Application.cs


示例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();


        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:11,代码来源:Application.cs


示例11: ServicePresenter

 public ServicePresenter(IDefault IDefault)
 {
     if (IDefault != null)
     {
         objIDefault = IDefault;
     }
 }
开发者ID:shanghaiese,项目名称:argicast,代码行数:7,代码来源:ServicePresenter.cs


示例12: Init

        public void Init(IDefault view, bool postBack)
        {
            _view = view;
            _view.TotalItem = Alert.CountAlertsByAccountID(_accountBeingViewed.AccountID);
            ShowDisplay();

        }
开发者ID:lengocluyen,项目名称:pescode,代码行数:7,代码来源:DefaultPresenter.cs


示例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");


        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:33,代码来源:Application.cs


示例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()
            );
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:64,代码来源:Application.cs


示例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();

        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:12,代码来源:Application.cs


示例16: Application

        //public readonly DefaultStyle style = new DefaultStyle();

        /// <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();
            @"Plasma".ToDocumentTitle();

        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:14,代码来源:Application.cs


示例17: 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()
     );
 }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:13,代码来源:Application.cs


示例18: 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)
        {
            //20150213
            // the effect no longer works?

            new NatureBoy.js.Class6().Initialize();

           
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:13,代码来源:Application.cs


示例19: 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)
        {
            // http://blog.teamtreehouse.com/accessing-the-device-camera-with-getusermedia
            // http://stackoverflow.com/questions/11539689/why-localstreams-contains-localmediastream-and-remotestreams-contains-mediastrea
            // https://developer.mozilla.org/en-US/docs/Web/API/Navigator.getUserMedia
            // http://neave.github.io/face-detection/


            var navigator = (NavigatorUserMedia)(object)Native.window.navigator;

            var successCallback =
                new Action<LocalMediaStream>(
                    localMediaStream =>
                    {
                        Console.WriteLine("got video");

                        //var src = (string)new IFunction("return window.URL.createObjectURL(this);").apply(localMediaStream);

                        var v = new IHTMLVideo { src = localMediaStream.ToObjectURL() }.AttachToDocument();

                        v.play();
                    }
                );

            var errorCallback =
                new Action<NavigatorUserMediaError>(
                    e =>
                    {
                        // restart on error? :P
                        Native.window.alert("no video: " + new { e.code });
                    }
                );

            //var a = 1;

            //var c = new MediaStreamConstraints { video = a == 1, audio = a == 0 };

            //var o = new IFunction("return {video: true};").apply(null);


            navigator.webkitGetUserMedia(
                new { video = true, audio = false },
                successCallback: IFunction.OfDelegate(
                    successCallback
                ),
                errorCallback: IFunction.OfDelegate(
                    errorCallback
                )
            );

            @"Hello world".ToDocumentTitle();
            // Send data from JavaScript to the server tier
            service.WebMethod2(
                @"A string from JavaScript.",
                value => value.ToDocumentTitle()
            );
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:61,代码来源:Application.cs


示例20: Application

        // gearVR browser?

        // would a service worker be of use
        // to download
        // unpack and cache all assets?




        /// <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)
        {

            // Error	3	The type or namespace name 'DiagnosticsConsole' could not be found in the global namespace (are you missing an assembly reference?)	X:\jsc.svn\examples\javascript\ImpAdventures\ImpAdventures\Application.cs	32	21	ImpAdventures
            //global::DiagnosticsConsole.ApplicationContent.BindKeyboardToDiagnosticsConsole();

            new Class4();


        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:23,代码来源:Application.cs



注:本文中的IDefault类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IDefinition类代码示例发布时间:2022-05-24
下一篇:
C# IDeepCopyable类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap