private JavaScriptValue Maximize(Formium owner, JavaScriptValue[] arguments)
        {
            if (owner.WindowType == NetDimension.NanUI.HostWindow.HostWindowType.Kiosk || !owner.CanMaximize)
            {
                return(null);
            }


            if (owner.WindowState != System.Windows.Forms.FormWindowState.Maximized)
            {
                owner.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            }
            else if (owner.WindowState == System.Windows.Forms.FormWindowState.Maximized)
            {
                if (owner.IsFullScreen)
                {
                    owner.FullScreen(false);
                }
                else
                {
                    owner.WindowState = System.Windows.Forms.FormWindowState.Normal;
                }
            }

            return(null);
        }
Beispiel #2
0
        private JavaScriptValue FullScreen(Formium owner, JavaScriptValue[] arguments)
        {
            if (owner.WindowType == HostWindow.HostWindowType.Kiosk)
            {
                return(null);
            }

            if (owner.AllowFullScreen)
            {
                owner.FullScreen(!owner.IsFullScreen);
            }
            return(null);
        }