一些C#代码
来源:互联网 发布:域名备案怎么注销 编辑:程序博客网 时间:2024/05/16 10:17
应用程序的主入口点
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
排序列表ListView
namespace Cst
{
class ContinuousTestViewHead
{
public ContinuousTestViewHead(string SectName)
{
_SectName = SectName;
}
public void Draw(Graphics g, Point org)
{
Rectangle rect = new Rectangle();
rect.Location = org;
rect.Width = this.Width;
rect.Height = CellHeight;
DrawCenterString(g, _SectName, rect);
rect.Location += new Size(0, CellHeight);
rect.Width = CellWidth;
DrawCenterString(g, "声时", rect);
rect.Location += new Size(CellWidth, 0);
DrawCenterString(g, "幅值", rect);
if (_ShowMore)
{
rect.Location += new Size(CellWidth, 0);
DrawCenterString(g, "声速", rect);
rect.Location += new Size(CellWidth, 0);
DrawCenterString(g, "PSD", rect);
rect.Location += new Size(CellWidth, 0);
DrawCenterString(g, "缺陷", rect);
}
}
public bool ShowMore
{
get { return _ShowMore; }
set { _ShowMore = value; }
}
public int Height
{
get
{
return 2 * CellHeight;
}
}
public int Width
{
get
{
if (_ShowMore)
return 5 * CellWidth;
else
return 2 * CellWidth;
}
}
public static Font Font
{
get { return ContinuousTestViewHead._Font; }
set { ContinuousTestViewHead._Font = value; }
}
private void DrawCenterString(Graphics g, string s, Rectangle rect)
{
TextFormatFlags flags = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter;
TextRenderer.DrawText(g, s, _Font, rect, SystemColors.ControlText, SystemColors.Window, flags);
g.DrawRectangle(Pens.Black, rect);
}
static int CellWidth = 50;
static int CellHeight = 20;
static Font _Font = SystemFonts.DefaultFont;
static bool _ShowMore = true;
string _SectName = string.Empty;
}
}
- 一些C#代码
- C#的一些入门代码
- c#代码的一些模式
- 一些关于C#处理进程的代码
- 一些关于C#发送邮件的代码
- 一些关于C#发送邮件的代码
- c#代码中的一些错误提示
- 一些常见的C#代码收集站点(牛)
- .Net xsd工具生成C#代码的一些方式
- 关于极光推送C#服务端代码的一些问题
- C#代码实现邮箱验证C#中及一些常用的正则表达式
- C#代码实现邮箱验证C#中及一些常用的正则表达式
- 一些代码
- 一些代码
- 一些代码
- 一些代码
- 一些代码
- 一些代码
- 使用JUnit测试代码
- 被磁盘阵列柜害惨!
- 留念7月的最后一天
- 在Web工程中实现任务计划调度
- 第一次
- 一些C#代码
- Memory Hacking Software MemHack 3.0.1.3 Pro by L. Spiro
- 电脑报编程工具调查爬行榜
- 视口与映射
- 唯一让盖茨晕倒的中国人
- Java Web应用中任务调度解析
- System.IO.Ports.SerialPort 应用-没完成
- C#压缩Access数据库
- 取第一块硬盘序列号