/// <summary>
        /// 기본 생성자
        /// </summary>
        public ProcessesSetWindowPosFunctionStrategy()
        {
            PreventMoveSceenIndex = ScreenUtility.GetFirstScreenIndexAndExceptPrimaryScreenIndex();

            // explorer 프로세스에는
            // 윈도우탐색기, 작업표시줄 등 다수의 창이 존재하므로 해당 프로세스는 제외한다.
            // 윈도우에서 제공되는 프로세스에 대한 창을 제어하기 위해서는 관리자 권한이 필요하다.
            ExceptProcessNames.Add(Explorer.ProcessName);
        }
コード例 #2
0
ファイル: TestForm.cs プロジェクト: soultomind/CommonLibrary
 private void ButtonMouseMovePrevent_Click(object sender, EventArgs e)
 {
     if (_isMultiScreen)
     {
         if (_mouseManager == null)
         {
             int preventMoveScreenIndex = ScreenUtility.GetFirstScreenIndexAndExceptPrimaryScreenIndex();
             IMouseFunctionStrategy functionStrategy = new MousePreventMoveScreenFunctionStrategy(preventMoveScreenIndex);
             _mouseManager = new MouseManager(functionStrategy);
             _mouseManager.StartWorkerThread();
             _ButtonMouseMovePrevent.Text = "마우스 이동 제어 정지";
         }
         else
         {
             _mouseManager.StopWorkerThread();
             _mouseManager = null;
             _ButtonMouseMovePrevent.Text = "마우스 이동 제어 시작";
         }
     }
 }
コード例 #3
0
ファイル: TestForm.cs プロジェクト: soultomind/CommonLibrary
        private void ButtonStartAndStopScreenCapture_Click(object sender, EventArgs e)
        {
            if (_isMultiScreen)
            {
                if (_imageCapture == null)
                {
                    _imageCapture = new ImageCapture(ScreenUtility.GetFirstScreenIndexAndExceptPrimaryScreenIndex());
                    _imageCapture.CreateImageCapture += ScreenImageCapture_CreateScreenImageCapture;
                    _imageCapture.Start();

                    _ButtonStartAndStopScreenCapture.Text = "스크린 캡쳐 정지";
                }
                else
                {
                    _imageCapture.Stop();
                    _imageCapture.CreateImageCapture -= ScreenImageCapture_CreateScreenImageCapture;
                    _imageCapture = null;

                    _ButtonStartAndStopScreenCapture.Text = "스크린 캡쳐 시작";
                }
            }
        }
コード例 #4
0
 /// <summary>
 /// 마우스 이동 방지 기본 생성자
 /// </summary>
 /// <exception cref="InvalidOperationException">모니터가 1개 일경우 발생함</exception>
 /// <exception cref="ArgumentException">preventMoveScreenIndex 값이 유효하지 않을경우</exception>
 public MousePreventMoveScreenFunctionStrategy()
     : this(ScreenUtility.GetFirstScreenIndexAndExceptPrimaryScreenIndex())
 {
 }