Пример #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(IApp page)
        {
            page.Go.onclick +=
                delegate
            {
                var t = new Stopwatch();
                t.Start();

                var service = new monese.experimental.MoneseWebServices();

                //{ value = a, ElapsedMilliseconds = 467, uid = 0 }
                //{ value = air@, ElapsedMilliseconds = 305, uid = 12 }

                service.GetUserIDAsync(
                    page.username.value,
                    "",
                    uid =>
                {
                    // The calling thread cannot access this object because a different thread owns it.

                    new IHTMLPre {
                        new
                        {
                            page.username.value,
                            t.ElapsedMilliseconds,
                            uid,
                        }
                    }.AttachToDocument();
                }
                    );
            };
        }
Пример #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(IApp page)
        {

            page.Go.onclick +=
                delegate
                {
                    var t = new Stopwatch();
                    t.Start();

                    var service = new monese.experimental.MoneseWebServices();

                    //{ value = a, ElapsedMilliseconds = 467, uid = 0 }
                    //{ value = air@, ElapsedMilliseconds = 305, uid = 12 }

                    service.GetUserIDAsync(
                        page.username.value,
                        "",
                        uid =>
                        {
                            // The calling thread cannot access this object because a different thread owns it.

                            new IHTMLPre {
                                 new
                                    {
                                        page.username.value,
                                        t.ElapsedMilliseconds,
                                        uid,
                                    }
                                 }.AttachToDocument();

                        }
                    );

                };

        }