MainForm.cs
(开头部分) 23KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace Sketchpad
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
SetStyle(ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer, true);
}
private int penwidth = 1;
private Bitmap bitmap = null;
private bool dragMode = false;
private int drawIndex = 1;
private int curX, curY, x, y, diffX, diffY, xx, yy;
private Graphics curGraphics;
private Pen curPen;
public Cursor curpen { get; set; }
private SolidBrush curBrush;
private bool ereaseMode = false;
public bool quxianMode = false;
private bool duobianMode = false;
private Point start;
private Point end, aaa;
private string filename;
public Image newimage;
private Stack<Bitmap> history, now;
private Color pencolor = Color.Black;
public Point[] point = new Point[10];
public Point[] point1 = new Point[10];
public int m = 1;//画曲线时用到
public int n = 1;//输入文字的位置
public bool writeMode = false;
public Point write;//写入点的位置
public bool endmode = true;
public int a = 0, e, f;
public int b = 0;
public int c = 0;
public int d = 0;
private bool button = false;//判断橡皮是否开始工作
private void Form1_Load(object sender, EventArgs e)
{
curpen = new Cursor("./pen.cur");
Cursor = curpen;
curPen = new Pen(pencolor, penwidth);
文本框.Visible = false;
bitmap = new Bitmap(780, 640);
curGraphics = Graphics.FromImage(bitmap);//budong
curGraphics.Clear(this.BackColor);
橡皮擦.Visible = false;
history = new Stack<Bitmap>();
now = new Stack<Bitmap>();
}
private void Form1_MouseDown(object sender, MouseEventArgs e)
后面还有 623 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。