LedTest/LedCtl/LedCtl.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

namespace LedCtl
{
	/// <summary>
	/// Led中的段(一个基本笔画),七段之一
	/// </summary>
	public struct Section
	{
		public Section(int numberofPoints)
		{
			this.P=new Point[numberofPoints];
		}
		/// <summary>
		/// 点数组
		/// </summary>
		public Point[] P;
	}


	/// <summary>
	/// LedCtl : 模仿七段式数码管的控件
	/// </summary>
	public class LedCtl : System.Windows.Forms.UserControl
	{
		/// <summary>
		/// 这个字节用来控制那些段被点亮!
		/// </summary>
		private byte m_DisplayCode=(byte)0x37;

		/// <summary>
		/// 段熄灭时的颜色,点亮为前景色
		/// </summary>
		private Color m_OffColor=Color.FromArgb(20,50,50);

		/// <summary>
		/// 用offcolor绘制熄灭笔画的边缘,而不是填充它!
		/// </summary>
		private bool b_DrawSectionBorder=true;
		/// <summary>
		/// 画刷
		/// </summary>
		private SolidBrush m_Brush;
		/// <summary>
		/// 铅笔
		/// </summary>
		private Pen m_Pen;
		/// <summary>
		/// 笔画宽度
		/// </summary>
		private int m_SectionThick=5;
		/// <summary>
		/// 段0~6点数组!!!注意,这7段并不包括小数点!!!
		/// </summary>
		private Section[] m_Sections=new Section[7];
后面还有 314 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。