Ejemplo n.º 1
0
        /// <summary>構造体を生成する</summary>
        /// <param name="title">Windowタイトル</param>
        /// <param name="className">クラス名</param>
        /// <param name="procId">プロセスID</param>
        /// <param name="rect">Window位置・サイズ</param>
        /// <param name="handle">Windowハンドル</param>
        /// <param name="maximized">最大化されているかどうか</param>
        /// <param name="minimized">最小化されているかどうか</param>
        public static WindowInfo Create(IntPtr handle, string title, string className, int procId, Int32Rect rect, bool minimized, bool maximized)
        {
            WindowInfo info = new WindowInfo();
            info.Handle = handle;
            info.Title = title;
            info.ClassName = className;
            info.ProcessId = procId;
            info.Rect = rect;
            info.IsMinimized = minimized;
            info.IsMaximized = maximized;
            info.PrevRect = Int32Rect.Empty;

            info.ZOrder = 0;
            return info;
        }
Ejemplo n.º 2
0
        /// <summary>コンストラクタ</summary>
        /// <param name="hWnd">現在のWindowハンドル</param>
        public WinEnumerator(IntPtr hWnd, Int32Rect screenRect, uint[] wallPixels)
        {
            _mainWindowHandle = hWnd;
            _mainProcessId = System.Diagnostics.Process.GetCurrentProcess().Id;
            _windowDesktop = WindowInfo.Create(IntPtr.Zero, "デスクトップ", null, _mainProcessId, screenRect, false, true);

            _screenRect = screenRect;
            _wallPixels = wallPixels;

            _blurEffect = new BlurEffect { Radius = Simulation.Sph.WALL_RADIUS };
            _blurEffect.Freeze();
        }