コード例 #1
0
 private void InternalUpdate()
 {
     if (_CheckAlign == ContentAlignment.MiddleRight)
     {
         HTMLTarget.appendChild(label, button);
         HTMLTarget.style.textAlign = ScriptCoreLib.JavaScript.DOM.IStyle.TextAlignEnum.right;
     }
     else
     {
         HTMLTarget.appendChild(button, label);
         HTMLTarget.style.textAlign = ScriptCoreLib.JavaScript.DOM.IStyle.TextAlignEnum.left;
     }
 }
コード例 #2
0
        public void InternalClose(CloseReason reason = CloseReason.None)
        {
            var a = new FormClosingEventArgs(reason, false);

            if (InternalBeforeFormClosing != null)
            {
                InternalBeforeFormClosing(a);
            }

            if (a.Cancel)
            {
                return;
            }

            if (FormClosing != null)
            {
                FormClosing(this, a);
            }

            if (a.Cancel)
            {
                return;
            }

            // stop any load/shown events from now on
            InternalClosed = true;

            foreach (var item in this.OwnedForms)
            {
                item.Close();
            }

            this.Owner = null;

            // why go normal?
            // conflict tested by
            // X:\jsc.svn\examples\javascript\InlinePageActionButtonExperiment\InlinePageActionButtonExperiment\Application.cs
            //this.WindowState = FormWindowState.Normal;


            //-webkit-transition: -webkit-transform 200ms linear; transition: -webkit-transform 200ms linear;
            // -webkit-filter: opacity(0.8);
            // -webkit-transform: scale(0.7);


            #region fadeout
            this.outer_css.style.transition = "none";
            (this.outer_css.style as dynamic).webkitFilter = " opacity(1.0)";
            this.outer_css.style.transform = " scale(1.0)";

            this.outer_css.style.transition = "-webkit-transform 50ms linear, -webkit-filter 50ms linear";

            (this.outer_css.style as dynamic).webkitFilter = " opacity(0.0)";
            this.outer_css.style.transform = " scale(0.95)";

            new ScriptCoreLib.JavaScript.Runtime.Timer(
                delegate
            {
                HTMLTarget.Orphanize();

                this.outer_css.style.transition = "none";

                (this.outer_css.style as dynamic).webkitFilter = "";
                this.outer_css.style.transform = "";
            }
                ).StartTimeout(100);
            #endregion


            // allow to be showed again?!
            InternalBeforeVisibleChangedDone = false;


            if (this.Closed != null)
            {
                this.Closed(this, new EventArgs());
            }

            RaiseFormClosed();
        }