public ApplicationSprite()
        {
            // https://sites.google.com/a/jsc-solutions.net/backlog/knowledge-base/2015/201505/20150502
            //         public var InternalOffsetMilliseconds:Number;
            // hello { InternalStart = 02.05.2015 11:54:23, diff = 00:00:00.0, InternalOffsetMilliseconds = NaN, offset = 00:00:00.NaN, Elapsed = 00:00:00.NaN, IsRunning = true, ElapsedMilliseconds = NaN }
            // didnt we fix it already?

            // jsc needs to init long fields!
            //InternalOffsetMilliseconds = 0
            //	;

            var sw = Stopwatch.StartNew();

            // hello {{ now = 14.04.2015 14:19:36, ElapsedMilliseconds = NaN }}
            // hello {{ now = 14.04.2015 14:20:26, IsRunning = true, ElapsedMilliseconds = NaN }}
            var InternalStart = DateTime.Now;
            var InternalStop  = DateTime.Now;

            //  public var InternalOffsetMilliseconds:Number;


            var diff = (InternalStop - InternalStart);
            // hello {{ InternalStart = 14.04.2015 14:22:16, diff = 00:00:00.0, IsRunning = true, ElapsedMilliseconds = NaN }}
            var offset = TimeSpan.FromMilliseconds(InternalOffsetMilliseconds);

            // hello {{ InternalStart = 14.04.2015 14:28:56, diff = 00:00:00.0, InternalOffsetMilliseconds = NaN, offset = 00:00:00.NaN, Elapsed = 00:00:00.NaN, IsRunning = true, ElapsedMilliseconds = NaN }}


            // hello {{ InternalStart = 14.04.2015 14:24:20, diff = 00:00:00.0, offset = 00:00:00.NaN, Elapsed = 00:00:00.NaN, IsRunning = true, ElapsedMilliseconds = NaN }}

            var Elapsed = diff + offset;

            // hello {{ ElapsedMilliseconds = NaN }}
            var t = new TextField
            {
                multiline = true,



                autoSize = TextFieldAutoSize.LEFT,

                text = "hello " + new
                {
                    InternalStart,
                    diff,
                    InternalOffsetMilliseconds,
                    offset,
                    Elapsed,
                    sw.IsRunning,
                    sw.ElapsedMilliseconds
                }
            };

            t.AttachToSprite();
        }
Exemple #2
0
        // import TestFlashAnonymousType.ApplicationSprite.__f__AnonymousType_44_0_1;



        // X:\jsc.svn\examples\actionscript\Test\TestAnonymousType\TestAnonymousType\Class1.cs
        //        V:\web\TestFlashAnonymousType\ApplicationSprite.as(38): col: 31 Error: Call to a possibly undefined method __f__AnonymousType_44_0_1.
        //                    field1.text = new __f__AnonymousType_44_0_1("hello there").toString();
        //                              ^
        //V:\web\TestFlashAnonymousType\ApplicationSprite.as(15): col: 52 Error: Definition TestFlashAnonymousType.ApplicationSprite:__f__AnonymousType_44_0_1 could not be found.
        //    import TestFlashAnonymousType.ApplicationSprite.__f__AnonymousType_44_0_1;
        //                                                   ^

        public ApplicationSprite()
        {
            var x = new TextField
            {
                // if i change one line,
                // could we let the running apps know of the change?
                text = new { foo = "hello there" }.ToString()
            };

            // would the new know which sprite is creating it?
            x.AttachToSprite();
        }
        public ApplicationSprite()
        {
            // jsc needs to init long fields!
            //InternalOffsetMilliseconds = 0
            //	;

            var sw = Stopwatch.StartNew();

            // hello {{ now = 14.04.2015 14:19:36, ElapsedMilliseconds = NaN }}
            // hello {{ now = 14.04.2015 14:20:26, IsRunning = true, ElapsedMilliseconds = NaN }}
            var InternalStart = DateTime.Now;
            var InternalStop  = DateTime.Now;

            //  public var InternalOffsetMilliseconds:Number;


            var diff = (InternalStop - InternalStart);
            // hello {{ InternalStart = 14.04.2015 14:22:16, diff = 00:00:00.0, IsRunning = true, ElapsedMilliseconds = NaN }}
            var offset = TimeSpan.FromMilliseconds(InternalOffsetMilliseconds);

            // hello {{ InternalStart = 14.04.2015 14:28:56, diff = 00:00:00.0, InternalOffsetMilliseconds = NaN, offset = 00:00:00.NaN, Elapsed = 00:00:00.NaN, IsRunning = true, ElapsedMilliseconds = NaN }}


            // hello {{ InternalStart = 14.04.2015 14:24:20, diff = 00:00:00.0, offset = 00:00:00.NaN, Elapsed = 00:00:00.NaN, IsRunning = true, ElapsedMilliseconds = NaN }}

            var Elapsed = diff + offset;

            // hello {{ ElapsedMilliseconds = NaN }}
            var t = new TextField
            {
                multiline = true,



                autoSize = TextFieldAutoSize.LEFT,

                text = "hello " + new
                {
                    InternalStart,
                    diff,
                    InternalOffsetMilliseconds,
                    offset,
                    Elapsed,
                    sw.IsRunning,
                    sw.ElapsedMilliseconds
                }
            };

            t.AttachToSprite();
        }