资源简介
一组基于C#开发的数码管显示与控制程序示例
代码片段和文件信息
/*
* Segmented led displayer Origionaly developed by Liu Xia - lxconan@gmail.com
* Feel free to use this control in your application or to improve it anyway.
* I will be very glad if you can send me a copy if you improve it.
*
* [2007-07-18]
* Performance improvement: DrawSingleCharWithFadedBk(...) method added to
* prevent drawing faded background character(‘8‘) every time.
*
* [2007-07-18]
* Performance improvement: Using cached path to prevent calculating paths in
* painting action.
*
* [2008-04-30]
* Add Smooth drawing and Italic text support.
*
* [2008-04-30]
* Bug fixed when user wants to draw regular rect bound.
*
* [2008-05-10]
* The text on the control can now be copied to clipboard.
* Bug fixed : the anti-alias effect disappeared when the rect bound is a
* regulare one
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace LxControl
{
///
/// A control that acts like a LED displayer
///
public class LxLedControl : Control ISupportInitialize
{
#region Nested Types
///
/// Specify how the text or value is aligned.
///
public enum Alignment
{
///
/// The text or value will align on the left side of the control.
///
Left = 0
///
/// The text or value will align on the right side of the control.
///
Right = 1
}
#endregion
#region Constructor
///
/// Construct one LxLedControl instance.
///
public LxLedControl()
{
// double buffered
this.Setstyle(Controlstyles.OptimizedDoubleBuffer true);
// support transplant background
this.Setstyle(Controlstyles.SupportsTransparentBackColor true);
// default color
this.ForeColor = Color.LightGreen;
this.BackColor = Color.Transparent;
// event handler
this.Click += new EventHandler(EvClick);
this.KeyDown += new KeyEventHandler(EvKeyDown);
this.GotFocus += new EventHandler(EvFocus);
this.LostFocus += new EventHandler(EvFocus);
}
///
/// Destructor
///
/// whether this method is called by Dispose()
protected override void Dispose(bool disposing)
{
DestoryCache();
base.Dispose(disposing);
}
#endregion
#region Helper Function
///
/// Paint one segment.
///
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 381678 2007-07-15 00:15 Ledcontrol_src\LEDControl\applications.ico
目录 0 2008-11-04 21:25 Ledcontrol_src\LEDControl\bin\Debug
文件 417792 2008-11-04 21:25 Ledcontrol_src\LEDControl\bin\Release\Lxsoft.Controls.LedControl.dll
文件 40448 2008-11-04 21:25 Ledcontrol_src\LEDControl\bin\Release\Lxsoft.Controls.LedControl.pdb
文件 16102 2008-11-04 21:25 Ledcontrol_src\LEDControl\bin\Release\Lxsoft.Controls.LedControl.xm
..AD... 0 2008-11-04 21:25 Ledcontrol_src\LEDControl\bin\Release
..AD... 0 2008-11-04 21:25 Ledcontrol_src\LEDControl\bin
文件 2605 2008-05-07 11:41 Ledcontrol_src\LEDControl\LEDControl.csproj
文件 100866 2008-05-10 12:56 Ledcontrol_src\LEDControl\LxLedControl.cs
目录 0 2008-11-04 21:25 Ledcontrol_src\LEDControl\obj\Debug\TempPE
目录 0 2008-11-04 21:25 Ledcontrol_src\LEDControl\obj\Debug
文件 264 2008-11-04 21:25 Ledcontrol_src\LEDControl\obj\LEDControl.csproj.FileList.txt
文件 417792 2008-11-04 21:25 Ledcontrol_src\LEDControl\obj\Release\Lxsoft.Controls.LedControl.dll
文件 40448 2008-11-04 21:25 Ledcontrol_src\LEDControl\obj\Release\Lxsoft.Controls.LedControl.pdb
目录 0 2008-11-04 21:25 Ledcontrol_src\LEDControl\obj\Release\TempPE
目录 0 2008-11-04 21:25 Ledcontrol_src\LEDControl\obj\Release
目录 0 2008-11-04 21:25 Ledcontrol_src\LEDControl\obj
文件 1444 2007-07-15 00:15 Ledcontrol_src\LEDControl\Properties\AssemblyInfo.cs
..AD... 0 2008-11-04 21:25 Ledcontrol_src\LEDControl\Properties
..AD... 0 2008-11-04 21:25 Ledcontrol_src\LEDControl
文件 2808 2008-05-07 11:41 Ledcontrol_src\LEDControl.sln
..A..H. 20144 2008-11-04 21:25 Ledcontrol_src\LEDControl.suo
目录 0 2008-11-04 21:25 Ledcontrol_src\TestControl\bin\Debug
目录 0 2008-11-04 21:25 Ledcontrol_src\TestControl\bin\Release
..AD... 0 2008-11-04 21:25 Ledcontrol_src\TestControl\bin
文件 381678 2007-07-17 15:09 Ledcontrol_src\TestControl\button green.ico
文件 540 2008-05-07 13:23 Ledcontrol_src\TestControl\Form1.cs
文件 8847 2008-05-07 13:23 Ledcontrol_src\TestControl\Form1.Designer.cs
文件 6008 2008-05-07 13:23 Ledcontrol_src\TestControl\Form1.resx
目录 0 2008-11-04 21:25 Ledcontrol_src\TestControl\obj\Debug\TempPE
............此处省略19个文件信息
相关资源
- C#代码生成器生成BL,DAL,Model三层代
- 点菜系统,适合C#初学者
- unity3D简易计算器C#脚本代码
- C#全局键盘钩子
- C#实现的图像压缩,大小压缩+质量压
- C# 实现简单邮件SMTP和POP3客户端 联系
- C#最短路径算法源码
- C# 控制台贪吃蛇
- C#星号密码查看器
- winform C# 实现百度地图
- C#调用摄像头拍照录像保存
- 带进度条的C#软件启动特效,类似Wo
- MyIE_V1.0_最终版源代码
- C# 抓取数据
- 多窗口应用程序(C#源代码编写)
- C#词频统计
- c#基于颜色特征的求解两张图片的相似
- C# API 大全
- 用C#语言实现的教务管理系统
- C#制作IP地址控件(IP、子网掩码、网
- C#远程桌面实时监控源码
- 基于UDP的文件传输DEMOC#编程实现,可
- C# 画流程图49290
- C# lua库 支持中文函数名中文变量
- C#二维码生成及批量打印
- C#毕业设计管理系统带论文
- 自制C#财物管理系统
- C#获取微信小程序openid等用户信息(前
- CLR via C# 第4版.pdf
- c# 视频播放的分屏算法分享给大家
评论
共有 条评论