CaptureItPlus/Capturemodes/frmOverlay.cs

(开头部分) 12KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace CaptureItPlus.Capturemodes
{
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Drawing.Imaging;
    using System.Windows.Forms;
    using System.Collections.Generic;
    using System.Threading;
    using System;

    public partial class frmOverlay : Form
    {
        private bool _isDrawing = false;
        private Point _endPoint = default(Point);
        private Point _starting = default(Point);
        private Common.CaptureModes _captureMode = Common.CaptureModes.Rectangle;
        private Pen _pen;
        private GraphicsPath _freeformPath;
        private int _x;
        private int _y;
        private bool _gridLines = false;

        public frmOverlay(string fileName)
            : this(fileName, Common.CaptureModes.Rectangle)
        {

        }
        public frmOverlay(string fileName, Common.CaptureModes captureMode)
        {
            InitializeComponent();
            Program.IsCaptureIsActive = true;
            CreateOverlayAllScreens();

            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.UserPaint, true);
            FileName = fileName;
            _captureMode = captureMode;
            _pen = new Pen(Color.Red, 3);
            _pen.DashStyle = DashStyle.Dash;
            switch (captureMode)
            {
                case Common.CaptureModes.Rectangle:
                    _gridLines = true;
                    break;
                case Common.CaptureModes.FreeForm:
                    _gridLines = true;
                    _freeformPath = new GraphicsPath();
                    break;
                case Common.CaptureModes.Circle:
                    break;
                case Common.CaptureModes.FixedRectangle:
                    frRectangle.Visible = true;
                    Cursor = Cursors.Default;
                    frRectangle.CaptureImage += new System.EventHandler(frRectangle_CaptureImage);
                    break;
                default:
                    break;
            }
        }
后面还有 275 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。