悟生慧

 

2016年6月3日

C# 实现一个可取消的多线程操作 示例

摘要: private void button1_Click(object sender, EventArgs e) { //定义一个为可取消资源标志 CancellationTokenSource cts = new CancellationTokenSource(); //定义二个为可取消资源标志... 阅读全文

posted @ 2016-06-03 11:02 悟生慧 阅读(1659) 评论(0) 推荐(0) 编辑

2016年1月22日

js 下载图片与下载文件的方式一样;保存至本地 ASP.NET 方式

摘要: public partial class WebForm : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPost... 阅读全文

posted @ 2016-01-22 15:35 悟生慧 阅读(1695) 评论(0) 推荐(0) 编辑

2015年9月11日

ajaxfileupload.js的简单使用

摘要: 上传文件 未选择任何文件引入上传文件 未选择任何文件参考:http://www.cnblogs.com/kissdodog/archive/2012/12/15/2819025.html $("#upload").bind("click", function () { ... 阅读全文

posted @ 2015-09-11 17:39 悟生慧 阅读(715) 评论(0) 推荐(0) 编辑

2015年6月16日

Wince 6.0适用 .NET 使用HttpRequest的Post上传文件,服务端的Web API接收Post上传上来的文件 代码

摘要: //调用的示例 private string fileName = "InStorageData.csv"; string filePath = parentPath + CommonHelper.UPLOAD + "\\" + fileName;/... 阅读全文

posted @ 2015-06-16 09:45 悟生慧 阅读(1729) 评论(0) 推荐(0) 编辑

2015年3月9日

C# .csv文件转为Excel格式;Excel格式转换为.csv

摘要: using System;using System.Diagnostics;using System.IO;using System.Reflection;using System.Windows.Forms;using Excel=Microsoft.Office.Interop.Excel;na... 阅读全文

posted @ 2015-03-09 12:07 悟生慧 阅读(8333) 评论(1) 推荐(0) 编辑

2014年11月25日

将汉字转换为拼音

摘要: private void txt_Chinese_TextChanged(object sender, EventArgs e) { txt_PinYIn.Text = //调用拼音类的GetABC方法得到拼音字符串 new Pin... 阅读全文

posted @ 2014-11-25 15:19 悟生慧 阅读(939) 评论(0) 推荐(0) 编辑

检查汉子字符

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

posted @ 2014-11-25 14:16 悟生慧 阅读(327) 评论(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 悟生慧 阅读(302) 评论(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 悟生慧 阅读(15427) 评论(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 悟生慧 阅读(1989) 评论(0) 推荐(0) 编辑

导航