示例#1
0
        /**
         * <summary>
         * ウィンドウ情報をデバッグ用に出力する
         * </summary>
         */
        public static void DebugWindowInfo(string message, WindowInfoWithHandle windowInfoWithHandle)
        {
            var windowHandle  = windowInfoWithHandle.windowHandle;
            var windowTitle   = windowInfoWithHandle.windowTitle;
            var monitorHandle = windowInfoWithHandle.GetMonitorHandle();
            var m             = message + $" : {windowTitle} ( hWnd={windowHandle}, hMonitor={monitorHandle} )";

            Logger.WriteLine(m);
        }
示例#2
0
        /**
         * <summary>
         * WindowInfoWithHandle をモニターの WindowManager から削除する
         * </summary>
         */
        public WindowManager RemoveWindowInfo(WindowInfoWithHandle windowInfoWithHandle)
        {
            // このウィンドウのモニターのウィンドウを管理する WindowManager が存在すれば
            // これに追加して管理させる
            var targetWindowManager = this.FindWindowManagerByMonitorHandle(windowInfoWithHandle.GetMonitorHandle());

            if (targetWindowManager is null)
            {
                return(this.windowManagers.ElementAt(0));
            }
            Logger.DebugWindowManager("windowManager of MonitorManager.RemoveWindowInfo", targetWindowManager);
            Logger.DebugWindowInfo("windowInfo of MonitorManager.RemoveWindowInfo", windowInfoWithHandle);
            targetWindowManager.Remove(windowInfoWithHandle);
            return(targetWindowManager);
        }
示例#3
0
        /**
         * <summary>
         * WindowInfoWithHandle をカレントモニター、カレントウィンドウにする
         * </summary>
         */
        public void ActivateWindowInfo(WindowInfoWithHandle windowInfoWithHandle)
        {
            var monitorHandle       = windowInfoWithHandle.GetMonitorHandle();
            var targetWindowManager = this.FindWindowManagerByMonitorHandle(monitorHandle);

            if (targetWindowManager == null)
            {
                return;
            }
            Logger.DebugWindowManager("windowManager of MonitorManager.ActivateWindowInfo", targetWindowManager);
            Logger.DebugWindowInfo("windowInfo of MonitorManager.ActivateWindowInfo", windowInfoWithHandle);
            this.SetCurrentWindowManagerIndexByMonitorHandle(monitorHandle);
            targetWindowManager.SetCurrentWindowIndexByWindowInfo(windowInfoWithHandle);
            return;
        }
示例#4
0
        /**
         * <summary>
         * WindowInfoWithHandle をモニターのWindowManagerの先頭に追加する
         * </summary>
         */
        public WindowManager PushWindowInfo(WindowInfoWithHandle windowInfoWithHandle)
        {
            // このウィンドウのモニターのウィンドウを管理する WindowManager が存在すれば
            // これに追加して管理させる
            var monitorHandle       = windowInfoWithHandle.GetMonitorHandle();
            var targetWindowManager = this.FindWindowManagerByMonitorHandle(monitorHandle);

            if (targetWindowManager is null)
            {
                return(this.GetCurrentMonitorWindowManager());
            }
            Logger.DebugWindowManager("windowManager of MonitorManager.PushWindowInfo", targetWindowManager);
            Logger.DebugWindowInfo("windowInfo of MonitorManager.PushWindowInfo", windowInfoWithHandle);
            this.SetCurrentWindowManagerIndexByMonitorHandle(monitorHandle);
            targetWindowManager.Push(windowInfoWithHandle);
            return(targetWindowManager);
        }