📄 class1.cs
字号:
using System;
using System.Drawing;
/// <summary>
/// Class1 的摘要说明。
/// </summary>
public class CLine
{
public int x1,y1,x2,y2;
public Color color;
public int width;
public Graphics g;
/*public CLine()
{
//
// TODO: 在此处添加构造函数逻辑
//
/*x1=0;
y1=0;
x2=0;
y2=0;
color=Color.White;
width=0;
g=null;
}*/
public CLine(int x1,int y1,int x2,int y2,Color color,int width,Graphics g)
{
this.x1=x1;
this.y1=y1;
this.x2=x2;
this.y2=y2;
this.color=color;
this.width=width;
this.g=g;
}
public void DrawLine()
{
Pen pen1=new Pen(color,width);
g.DrawLine(pen1,x1,y1,x2,y2);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -