예제 #1
0
        private bool SelectHandle(RegionCaptureOptions options)
        {
            SelectedWindow = null;

            SimpleWindowInfo simpleWindowInfo = RegionCaptureTasks.GetWindowInfo(options);

            if (simpleWindowInfo != null)
            {
                SelectedWindow = new WindowInfo(simpleWindowInfo.Handle);
                UpdateWindowInfo();
                return(true);
            }

            return(false);
        }
예제 #2
0
        private bool SelectHandle(bool isWindow)
        {
            RegionCaptureOptions options = new RegionCaptureOptions()
            {
                DetectControls = !isWindow
            };

            SelectedWindow = null;

            SimpleWindowInfo simpleWindowInfo = RegionCaptureTasks.GetWindowInfo(options);

            if (simpleWindowInfo != null)
            {
                SelectedWindow = new WindowInfo(simpleWindowInfo.Handle);
                IsWindow       = isWindow;
                UpdateWindowInfo();
                return(true);
            }

            return(false);
        }