Form1.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
// 下载于www.51aspx.com
namespace RuntimeAdjustControlApp
{
public partial class Form1 : Form
{
private Point startPos;
private Rectangle mouseRect = Rectangle.Empty;
public Form1()
{
InitializeComponent();
}
private void DrawRectangle()
{
Rectangle rect = this.RectangleToScreen(mouseRect);
ControlPaint.DrawReversibleFrame(rect, this.BackColor, FrameStyle.Dashed);
}
private void Form1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button != MouseButtons.Left)
{
return;
}
startPos = new Point(e.X, e.Y);
this.Capture = true;
Cursor.Clip = this.RectangleToScreen(new Rectangle(0, 0, ClientSize.Width, ClientSize.Height));
mouseRect = new Rectangle(startPos.X, startPos.Y, 0, 0);
Queue<CRectControl> q = new Queue<CRectControl>();
foreach (Control ctl in this.Controls)
{
if (ctl is CRectControl)
{
q.Enqueue((CRectControl)ctl);
}
}
while (q.Count > 0)
{
CRectControl item = q.Dequeue();
item.Free();
this.Controls.Remove(item);
}
q = null;
}
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
后面还有 69 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。