예제 #1
0
 public void Ready()
 {
     if (AutoHide.NotAutoHide())
     {
         AutoHide.SetAutoHide();
     }
 }
예제 #2
0
 public void Ready()
 {
     _sendMessage = true;
     if (AutoHide.NotAutoHide())
     {
         AutoHide.SetAutoHide();
     }
 }
예제 #3
0
        public void Run()
        {
            if (_maxWindow != IntPtr.Zero)
            {
                if (_maxWindow.IsWindowInvisible() || _maxWindow.IsNotMaximizeWindow())
                {
                    Ready();
                }
                return;
            }

            if (Variable.taskbars.IsMouseOverTaskbar())
            {
                return;
            }

            EnumWindows((handle, lp) =>
            {
                if (handle.IsWindowInvisible())
                {
                    return(true);
                }

                if (handle.IsNotMaximizeWindow())
                {
                    return(true);
                }

                switch (lp)
                {
                case AutoModeType.BlacklistMode when handle.InBlacklist():
                    return(true);

                case AutoModeType.WhitelistMode when handle.NotInWhitelist():
                    return(true);

                default:
                    _maxWindow = handle;
                    return(false);
                }
            }, Settings.ModeType);

            if (_maxWindow == IntPtr.Zero)
            {
                if (_tryShowBar == false)
                {
                    return;
                }
                _tryShowBar = false;
                AutoHide.CancelAutoHide();
            }
            AutoHide.SetAutoHide();
        }
예제 #4
0
        public void Run()
        {
            if (_maxWindow != IntPtr.Zero)
            {
                if (_maxWindow.IsWindowInvisible() || _maxWindow.IsNotMaximizeWindow())
                {
                    Ready();
                }
                return;
            }

            if (Variable.taskbars.IsMouseOverTaskbar())
            {
                return;
            }

            EnumWindows((handle, lp) =>
            {
                if (handle.IsWindowInvisible())
                {
                    return(true);
                }

                if (handle.IsNotMaximizeWindow())
                {
                    return(true);
                }

                switch (lp)
                {
                case AutoModeType.BlacklistMode when handle.InBlacklist():
                    return(true);

                case AutoModeType.WhitelistMode when handle.NotInWhitelist():
                    return(true);

                default:
                    _maxWindow = handle;
                    return(false);
                }
            }, Settings.ModeType);

            if (_maxWindow == IntPtr.Zero)
            {
                if (_tryShowBar == false)
                {
                    return;
                }
                _tryShowBar = false;
                switch (Settings.ModeType)
                {
                case AutoModeType.ClassicAutoMode:
                    AutoHide.CancelAutoHide();
                    return;

                case AutoModeType.ClassicAdaptiveMode:
                    ButtonSize.SetIconSize(Constant.IconLarge);
                    return;

                case AutoModeType.BlacklistMode:
                    Settings.BlistDefaultState.SetState();
                    return;

                case AutoModeType.WhitelistMode:
                    Settings.WlistDefaultState.SetState();
                    return;

                default:
                    return;
                }
            }

            switch (Settings.ModeType)
            {
            case AutoModeType.ClassicAutoMode:
                AutoHide.SetAutoHide();
                return;

            case AutoModeType.ClassicAdaptiveMode:
                ButtonSize.SetIconSize(Constant.IconSmall);
                return;

            case AutoModeType.BlacklistMode:
                Settings.BlistTargetState.SetState();
                return;

            case AutoModeType.WhitelistMode:
                Settings.WlistTargetState.SetState();
                return;
            }
        }