摘要:
public partial class ValidateCode : System.Web.UI.Page { /// <summary> /// Validation Code generated fromt these charaters. /// Note: l,L 1(number), o, O, 0(number) are removed /// </summary> private const string strValidateCodeBound = "abcdefghijkmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVW 阅读全文
摘要:
public partial class Demo: Form { /// <summary> /// 鼠标停留页面时间计时 /// </summary> System.Windows.Forms.Timer time_stop; /// <summary> /// 记录鼠标的x坐标和y坐标 /// </summary> int x, y; /// <summary> /// 计时器开始 /// </summary> DateTime start; public Demo() { InitializeComponent() 阅读全文
摘要:
/*清空浮动 此类放在包含浮动的div里面*/.clearfloat:after { display:block; clear:both; content:''; visibility:hidden; height:0; }.clearfloat { zoom:1; }/* 清除内外边距 */body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */dl, dt, dd, ul, ol, li, /* list elements 列表元素 */pre, /* text forma 阅读全文
摘要:
public class WeatherModel { #region 定义成员变量 private string _temperature = ""; private string _weather = ""; private string _wind = ""; private string _city = ""; private DateTime _dateStart = DateTime.Now; private string _coldPoint = ""; private strin 阅读全文
摘要:
public static classPageBase { public static String MD5(String input) { System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider(); byte[] bytes = System.Text.Encoding.UTF8.GetBytes(input); bytes = md5.ComputeHash(bytes); md5.Clear(); string ret = ""; 阅读全文
摘要:
//Panel重写(不闪烁) public class BackgroundPanel : Panel { public BackgroundPanel() { this.SetStyle(ControlStyles.AllPaintingInWmPaint | //不擦除背景 ,减少闪烁 ControlStyles.OptimizedDoubleBuffer | //双缓冲 ControlStyles.UserPaint, //使用自定义的重绘事件,减少闪烁 true); //设置值 } }//页面布局 partial class test2 { /// <summary> // 阅读全文
摘要:
DateTime Time; private void timer_Tick(object sender,EventArgs e) { this.Time = DateTime.Now; Invalidate(); } private void UCTime_Paint(object sender, PaintEventArgs e) { Graphics dc = e.Graphics; Pen pn = new Pen(ForeColor); SolidBrush br = new SolidBrush(ForeColor); InitCoordinates(dc); //设置绘画的... 阅读全文
摘要:
Winform跑马灯——Graphics运用本文将建立一个winform项目中运用graphics绘制跑马灯效果的简单实例,以下是详细步骤:新建一个winform项目WinPicRoll,本例采用框架.net 2.0,如果采用.net 4.0某些属性的使用会略有不同,并放入一些演示用图片,滚动用图片采用png格式,一张背景图片采用jpg格式,设置所有图片素材的属性为"如果较新则复制",这样就可以在程序中使用相对路径来获取图片。在Form1中,添加布局代码,本例采用一个picturebox用来演示。 public Form1() { Initia... 阅读全文
摘要:
1、创建缓存方法(ProjectName是项目名称)namespace ProjectName.Factory{ /// <summary> /// DataCache 的摘要说明。 /// </summary> public class DataCache { /// <summary> /// 获取当前应用程序指定CacheKey的Cache值 /// </summary> /// <param name="CacheKey"></param> /// <returns></ret 阅读全文