上一页 1 2 3 4 5 6 7 8 ··· 17 下一页
摘要: 方法一:使用正则表达式 1//脏字典数据存放文件路径 2 private static string FILE_NAME="zang.txt"; 3 //脏数据字典表,如:脏数据一|脏数据二|脏数据三 4 public static string dirtyStr=""; 5 6 public ValidDirty... 阅读全文
posted @ 2008-10-23 10:55 Landy_di 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 方法一: 原文:http://blog.csdn.net/qiujiahao/archive/2007/08/09/1733169.aspx 在unicode 字符串中,中文的范围是在4E00..9FFF:CJK Unified Ideographs。 通过对字符的unicode编码进行判断来确定字符是否为中文。 程序代码 protected bool IsChineseLetter... 阅读全文
posted @ 2008-10-23 10:55 Landy_di 阅读(473) 评论(0) 推荐(0) 编辑
摘要: 程序代码 using System; using System.IO; using System.Text; using System.Text.RegularExpressions; using System.Runtime.Remoting; using System.Runtime.Remoting.Proxies; using System.Runtime.Remoting.Mes... 阅读全文
posted @ 2008-10-23 10:54 Landy_di 阅读(271) 评论(0) 推荐(0) 编辑
摘要: using System.Net.Mail; ...... /// /// .NET 2.0 发送邮件方法 /// /// 邮件服务器地址(如:smtp.163.com) /// 发送地址(如:test@163.com) /// 发送密码(如:123456) /// 接收地址(如:test@gmail.com) ///... 阅读全文
posted @ 2008-10-23 10:54 Landy_di 阅读(116) 评论(0) 推荐(0) 编辑
摘要: (文章载自http://www.cnblogs.com/tonybain/archive/2006/01/18/319614.html) 我们知道,如果要国际化和本地化一个软件,就必须涉及到资源的处理,这些资源包括了在不同文化区域中具有不同表现形式的文字、图片、窗体或其它类型的资源。在传统的Win32程序中,通常可以使用纯资源dll的办法实现,但我们现在要讨论的是在.NET环境下如何实现这一目标... 阅读全文
posted @ 2008-10-23 10:53 Landy_di 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 在上一章.NET应用程序资源开发(一)关于.NET应用程序资源开发的基本概念介绍完了,也该实际演练一下了,接下来就用一个WinForm例子来看一下在.NET中实现资源开发都有哪些技术。 我们首先建立一个项目,打开你的VS.NET 2005,建立一个新的C# Windows 应用程序。 Step 1-窗体的Language和Localizable属性 我们要为该窗体的资源建立多语言的版本,注... 阅读全文
posted @ 2008-10-23 10:53 Landy_di 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 在不同的语言环境下,对正则的支持都可能不一样,实际应用时注意不同之处 匹配中文字符的正则表达式: [\u4e00-\u9fa5] 评注:匹配中文还真是个头疼的事,有了这个表达式就好办了 匹配双字节字符(包括汉字在内):[^\x00-\xff] 评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1) 匹配空白行的正则表达式:\n\s*\r 评注:可以用来删除空白行 匹配... 阅读全文
posted @ 2008-10-23 10:53 Landy_di 阅读(93) 评论(0) 推荐(0) 编辑
摘要: It's finally here - the launch of the .NET Reference Source project. This post (hopefully!) contains everything you need to know. Over the past few weeks, we ran a pilot of this feature and collect... 阅读全文
posted @ 2008-10-23 10:52 Landy_di 阅读(217) 评论(0) 推荐(0) 编辑
摘要: //写入注册表 try { Microsoft.Win32.RegistryKey res ; res = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"SOFTWARE\testname",true); if (res == null) { try { res =... 阅读全文
posted @ 2008-10-23 10:52 Landy_di 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 实现主要是通过重写窗口过程(WndProc),处理一些非客户区消息(WM_NCxxxx); 1[DllImport("User32.dll")] 2 private static extern IntPtr GetWindowDC(IntPtr hwnd); 3 [DllImport("User32.dll")] 4 private static... 阅读全文
posted @ 2008-10-23 10:51 Landy_di 阅读(1858) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 17 下一页