资源简介
一组基于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# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
- C#指纹识别系统程序 报告
- c# 高校档案信息管理系统
- c#向word文件插入图片
- C#左侧导航菜单(动态生成)
评论
共有 条评论