悟生慧

 
上一页 1 2 3 4 5 6 ··· 27 下一页

2014年11月25日

检查汉子字符

摘要: private void btn_GetCount_Click(object sender, EventArgs e) { int P_scalar = 0;//定义值类型变量并赋值为0 Regex P_regex = //创建正则表达式对... 阅读全文

posted @ 2014-11-25 14:16 悟生慧 阅读(337) 评论(0) 推荐(0)

2014年5月3日

初学JQuery笔记

摘要: extend()函数是jQuery的基础函数之一,作用是扩展现有的对象说明:$.extend(true, obj1, obj2)表示以obj2中的属性扩展对象obj1,第一个参数设为true表示深复制。 虽然obj1中原来没有"x"属性,但经过扩展后,obj1不但具有了"x"属性,而且对obj2中的... 阅读全文

posted @ 2014-05-03 19:24 悟生慧 阅读(311) 评论(0) 推荐(0)

2014年3月14日

vb.net字符串格式转为日期型

摘要: vb.net字符串格式转为日期型 比如 "20080815" 转换为"2008-05-15"Dim a As Date Dim s As String = "20080815" a = CDate(Format(CInt(s), "0000-00-00")) MsgBox(a.Year) 阅读全文

posted @ 2014-03-14 16:36 悟生慧 阅读(15587) 评论(0) 推荐(0)

2014年1月24日

VB.NET TextBox 只允许输入1-100之间的整数 简洁篇

摘要: 1 Dim Str As String = "" 2 Private Sub txtRecond_KeyUp(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles txtRecond.KeyUp 3 txtRecond.Text = Regex.Replace(txtRecond.Text, "[^0-9]", "") 4 If txtRecond.Text = "" Then 5 Return 6 End If ... 阅读全文

posted @ 2014-01-24 08:52 悟生慧 阅读(2012) 评论(0) 推荐(0)

2013年8月15日

C#去掉list集合中的重复数据

摘要: List conList= new List(); List listII = new List(); int m = 0; for (int i = 0; i < conList.Count; i++) { string i_value = (string)conList[i]; for (int j = 0; j < conList.Count; j++) { ... 阅读全文

posted @ 2013-08-15 16:34 悟生慧 阅读(17557) 评论(1) 推荐(0)

C#获取操作系统是32位或64位的代码

摘要: 注意需添加引用System.Management)public static string Distinguish64or32System(){try{string addressWidth = String.Empty;ConnectionOptions mConnOption = new ConnectionOptions();ManagementScope mMs = new ManagementScope("\\\\localhost", mConnOption);ObjectQuery mQuery = new ObjectQuery("select A 阅读全文

posted @ 2013-08-15 16:30 悟生慧 阅读(1013) 评论(0) 推荐(0)

2013年8月2日

C# XSD校验XML文件的代码

摘要: /// /// XSD文件校验XML /// /// public ArrayList ECSValueValidation() { ArrayList al = new ArrayList(); try { //doc是XmlDocument对象 doc.Load(m_xmlURL); } catch (System.Exception ex) ... 阅读全文

posted @ 2013-08-02 10:55 悟生慧 阅读(1044) 评论(0) 推荐(0)

C# 队列集合的使用

摘要: using System; using System.Collections.Generic; using System.Text; using System.Collections; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Queue qu = new Queue(); Queue qu2 = new Queue(); foreach (int... 阅读全文

posted @ 2013-08-02 10:49 悟生慧 阅读(491) 评论(0) 推荐(0)

根据Excel线程句柄得到ID并且关闭进程

摘要: [System.Runtime.InteropServices.DllImport("User32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto)] private static extern int GetWindowThreadProcessId(IntPtr hwnd, out int ID); private void Kill(Microsoft.Office.Interop.Excel.Application excel) { IntPtr t ... 阅读全文

posted @ 2013-08-02 10:45 悟生慧 阅读(2172) 评论(1) 推荐(0)

使用timer控件控制进度条

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace ECS.Simulate{ public partial class FrmProgress : Form { public FrmProgress() { InitializeComponent(); this.CenterToParent(); progres 阅读全文

posted @ 2013-08-02 10:33 悟生慧 阅读(857) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 ··· 27 下一页

导航