Ejemplo n.º 1
0
            public static Style ApplyTo(this Style e, IStyle s)
            {
                s.backgroundColor = e.BackgroundColor;
                s.color = e.Color;

                return e;
            }
Ejemplo n.º 2
0
 public static void set_contentAsync(IStyle that, Task<string> value)
 {
     value.ContinueWith(
          task =>
          {
              that.content = task.Result;
          }
      );
 }
Ejemplo n.º 3
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(IApp page)
        {
            // we have title
            // we have content
            // lets have padding done dynamically.

            // head, title {
            //    display: block;
            //}


            var range = new IHTMLInput { type = ScriptCoreLib.Shared.HTMLInputTypeEnum.range, min = 0, max = 1000 }.AttachToDocument();

            new IStyle(range)
            {
                left = "1em",
                bottom = "1em",

                position = IStyle.PositionEnum.@fixed
            };


            range.AttachTo(Native.document.documentElement);



            var title = new IStyle(IHTMLElement.HTMLElementEnum.title)
            {
                paddingLeft = "0px",
                //boxShadow = "17px -5px 88px 29px rgba(0,0,0,0.69)"
            };

            var p = new IStyle(IHTMLElement.HTMLElementEnum.p)
            {
                paddingLeft = "0px",
                //boxShadow = "17px -5px 88px 29px rgba(0,0,0,0.69)"
            };

            Native.window.onframe += delegate
            {
                title.paddingLeft = range.valueAsNumber + "px";
                p.paddingLeft = range.valueAsNumber + "px";
            };

            Native.window.onresize += delegate
            {
                range.valueAsNumber = Native.window.Width / 4;
            };
        }
		public static void WhenActivated(this ISupportsActivation source, IHTMLElement element, IStyle.DisplayEnum display)
		{
			element.style.display = IStyle.DisplayEnum.none;

			source.Activated +=
				delegate
				{
					element.style.display = display;
				};

			source.Deactivated +=
				delegate
				{
					element.style.display = IStyle.DisplayEnum.none;
				};
		}
Ejemplo n.º 5
0
        // http://www.britishideas.com/2008/09/07/importing-dxf-files-into-inkscape/

        /// <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)
        {
            //  Open Office Draw can load a DXF file and save an SVG file. I’ve tried it and it worked – I was able to take a DXF file, convert to SVG, load into Inkscape, 
            // does not work with ink scape nor libre office.
            // revert to png?

            // https://docs.google.com/file/d/0B-UG88wHB6NOeVh6cHJ2eWpnWkU/edit
            // https://docs.google.com/file/d/0B-UG88wHB6NOczdMMk44aGRXRlE/edit

            //           img:nth-of-type(2) {
            //    border: 1px dashed red;

            //    margin-top: 100px;
            //    -webkit-transform: scale(0.38) rotate(22deg);
            //}

            // HTML animation for now, until we figure out how to do it in WebGL?!

            Native.document.body.style.backgroundColor = "blue";

            var s = new IStyle(Native.css[IHTMLElement.HTMLElementEnum.img][1])
            {
                border = "0px dashed blue"
            };

            // http://www.ladydragon.com/news2014/qeg.pdf
            // THE STATOR, or generator core, is made using 140 laminations of 
            // 24 gauge M19 C5 electrical steel
            //forming a stack of 3 - ½ inches, with a 4 pole configuration. 
            // Corresponding ROTOR with 2 poles. Both 
            //STATOR and ROTOR are tig welded in 4 places. 

            // http://2012portal.blogspot.com/2014/04/report-about-japan-and-taiwan.html
            // rename to CSS* experiment instead?
            Native.window.onframe +=
                e =>
                {
                    //-webkit-transform: scale(0.38) rotate(22deg);
                    // too slow?
                    s.transform = "scale(0.38) " + "rotate(" + e.counter + "deg)";
                };
        }
Ejemplo n.º 6
0
 static IStyle InternalConstructor(IStyle e)
 {
     // X:\jsc.svn\core\ScriptCoreLib.Windows.Forms\ScriptCoreLib.Windows.Forms\JavaScript\BCLImplementation\System\Windows\Forms\TreeView\TreeView.cs
     return e;
 }
Ejemplo n.º 7
0
 public IStyle(IStyle e)
 {
     // InternalConstructor
 }