WindowsFormsApp/FrmLines.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApp
{
public partial class FrmLines : Form
{
#region 内部变量
private Graphics _g = null;
/// <summary>
/// 背景图像
/// </summary>
private Image _imageCache = null;
/// <summary>
/// 单元格的宽(100%)
/// </summary>
private int _cellWidth_px = 100;
/// <summary>
/// 单元格的高(100%)
/// </summary>
private int _cellHeight_px = 100;
private float _zoomOld = 1.0f;
private float _zoom = 1.0f;
private float _zoomMin = 0.1f;
private float _zoomMax = 1000f;
/// <summary>
/// 表格的左上角
/// </summary>
private PointF _gridLeftTop = new PointF(200, 200);
private bool _leftButtonPress = false;
private PointF _mousePosition = new PointF(0, 0);
#endregion
public FrmLines()
{
InitializeComponent();
//设置Paint参数以便能更好的控制Paint.
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true);
this.MouseWheel += Form1_MouseWheel;
}
private void Form1_MouseWheel(object sender, MouseEventArgs e)
{
var delta = e.Delta;
if (Math.Abs(delta) < 10)
{
return;
后面还有 190 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
