Exemplo n.º 1
0
        /// <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)
        {
            var s = new ApplicationSprite();
            var e = s.ToHTMLElement();

            s.AttachSpriteTo(page.PageContainer);

            Action Update =
                delegate
            {
                var w = page.SizeShadow.scrollWidth;
                var h = page.SizeShadow.scrollHeight;


                e.style.SetSize(w, h);
            };


            Native.window.onresize +=
                delegate
            {
                Update();
            };

            Update();
        }
Exemplo n.º 2
0
        /// <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)
        {
            var s = new ApplicationSprite();
            var e = s.ToHTMLElement();

            s.AttachSpriteTo(page.PageContainer);

            Action Update =
                delegate
                {
                    var w = page.SizeShadow.scrollWidth;
                    var h = page.SizeShadow.scrollHeight;


                    e.style.SetSize(w, h);
                };


            Native.window.onresize +=
                delegate
                {
                    Update();
                };

            Update();
        }