ImageEditor/FrmMainUI.cs
(开头部分) 19KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using CaptureItPlus.Libs;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Windows.Forms;
namespace ImageEditor
{
public partial class FrmMainUI : Form
{
private string _fileName = string.Empty;
private readonly List<CustomShape> _shapes;
private GraphicsPath _graphicsPath;
private Shape _selectedShape = Shape.Pen;
private Color _selectedColor = Color.Red;
private PenSize _selectedSize = PenSize.Fine;
private Pen _selectedPen;
private readonly Pen _highlighterPen;
private bool _isSaved = false;
private CustomShape _shape;
private int _x;
private int _y;
public FrmMainUI()
{
InitializeComponent();
_shapes = new List<CustomShape>();
_highlighterPen = new Pen(Color.FromArgb(95, Color.Yellow), (int)PenSize.Thick);
UpdatePen();
}
public FrmMainUI(string fileName)
: this()
{
_fileName = fileName;
LoadImage(_fileName);
}
private void openFileToolStripMenuItem_Click(object sender, EventArgs e)
{
if (!_isSaved && _shapes.Count >= 1)
{
var result = MessageBox.Show("Current Screenshot modified. Would you like to save it?",
"Screenshot Editor", MessageBoxButtons.YesNoCancel);
if (result == DialogResult.Yes)
{
SaveAsFile();
if (!_isSaved)
{
return;
}
}
else if (result == DialogResult.Cancel)
{
return;
}
}
后面还有 474 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
