コード例 #1
0
        public static PointInfo GetPointInfo()
        {
            using (RectangleRegionForm form = new RectangleRegionForm(RectangleRegionMode.ScreenColorPicker))
            {
                form.Config.DetectWindows = false;
                form.Config.ShowTips      = false;
                form.Config.UseDimming    = false;

                form.Prepare();
                form.ShowDialog();

                if (form.Result == RegionResult.Region)
                {
                    PointInfo pointInfo = new PointInfo();
                    pointInfo.Position = form.CurrentPosition;
                    pointInfo.Color    = form.CurrentColor;
                    return(pointInfo);
                }
            }

            return(null);
        }
コード例 #2
0
ファイル: RegionCaptureTasks.cs プロジェクト: mehlian/ShareX
        public static PointInfo GetPointInfo(RegionCaptureOptions options, Bitmap canvas = null)
        {
            RegionCaptureOptions newOptions = GetRegionCaptureOptions(options);

            newOptions.DetectWindows = false;
            newOptions.UseDimming    = false;

            using (RegionCaptureForm form = new RegionCaptureForm(RegionCaptureMode.ScreenColorPicker, newOptions, canvas))
            {
                form.ShowDialog();

                if (form.Result == RegionResult.Region)
                {
                    PointInfo pointInfo = new PointInfo();
                    pointInfo.Position = form.CurrentPosition;
                    pointInfo.Color    = form.ShapeManager.GetCurrentColor();
                    return(pointInfo);
                }
            }

            return(null);
        }
コード例 #3
0
        public static PointInfo GetPointInfo()
        {
            using (RectangleRegionForm form = new RectangleRegionForm(RectangleRegionMode.ScreenColorPicker))
            {
                form.Config.DetectWindows = false;
                form.Config.ShowTips = false;
                form.Config.UseDimming = false;

                form.Prepare();
                form.ShowDialog();

                if (form.Result == RegionResult.Region)
                {
                    PointInfo pointInfo = new PointInfo();
                    pointInfo.Position = form.CurrentPosition;
                    pointInfo.Color = form.CurrentColor;
                    return pointInfo;
                }
            }

            return null;
        }
コード例 #4
0
        public static PointInfo GetPointInfo(RegionCaptureOptions options)
        {
            using (RegionCaptureForm form = new RegionCaptureForm(RegionCaptureMode.ScreenColorPicker))
            {
                form.Config = GetRegionCaptureOptions(options);
                form.Config.DetectWindows = false;
                form.Config.ShowHotkeys   = false;
                form.Config.UseDimming    = false;

                form.Prepare();
                form.ShowDialog();

                if (form.Result == RegionResult.Region)
                {
                    PointInfo pointInfo = new PointInfo();
                    pointInfo.Position = form.CurrentPosition;
                    pointInfo.Color    = form.CurrentColor;
                    return(pointInfo);
                }
            }

            return(null);
        }
コード例 #5
0
ファイル: RegionCaptureTasks.cs プロジェクト: L1Q/ShareX
        public static PointInfo GetPointInfo(RegionCaptureOptions options)
        {
            using (RegionCaptureForm form = new RegionCaptureForm(RegionCaptureMode.ScreenColorPicker))
            {
                form.Config = GetRegionCaptureOptions(options);
                form.Config.DetectWindows = false;
                form.Config.ShowHotkeys = false;
                form.Config.UseDimming = false;

                form.Prepare();
                form.ShowDialog();

                if (form.Result == RegionResult.Region)
                {
                    PointInfo pointInfo = new PointInfo();
                    pointInfo.Position = form.CurrentPosition;
                    pointInfo.Color = form.CurrentColor;
                    return pointInfo;
                }
            }

            return null;
        }