随笔分类 - winform
摘要:.Net Framework 4及以上有Chart控件,添加 Series是图表中的柱状体的集合,Legends是柱状体的标题批注,Titles是整个图表的标题修改Series批注数据源--添加新数据源添加数据类--项目名称右键添加--LINQ to SQL类--点击资源服务管理器--通过连接的SQ...
阅读全文
摘要:使用ReportViewer控件。添加完控件,添加报表,在项目名--右键--报表,添加。数据集--右键--添加数据集,连接数据库。工具箱--表两个表的连接项目名--右键--数据集。跳转到新建数据集页面,右键添加数据表。选中degree 右键属性DataType设置数据类型 private void ...
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Window...
阅读全文
摘要:html中写正则表达式时,为了避免分歧,最好不用引号,用/^开头,$/结束正则表达式用于字符串处理,表单验证等场合,实用高效,但用到时总是不太把握,以致往往要上网查一番。我将一些常用的表达式收藏在这里,作备忘之用。本贴随时会更新。 匹配中文字符的正则表达式: [\u4e00-\u9fa5] 匹配双字...
阅读全文
摘要:发送邮件的邮箱要先启用SMTP,否则不能发送using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO...
阅读全文
摘要:WebRequest 对象的使用// 待请求的地址string url = "http://www.cnblogs.com"; // 创建 WebRequest 对象,WebRequest 是抽象类,定义了请求的规定,// 可以用于各种请求,例如:Http, Ftp 等等。/...
阅读全文
摘要:使用的是WebRequest类,在这以http://novel.hongxiu.com/a/1036665/10425842.html为例。代码如下:using System;using System.Collections.Generic;using System.ComponentModel;u...
阅读全文
摘要:using System;using System.Collections;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System...
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Net;usin...
阅读全文
摘要:使用截取字符串的方法,打乱原有文档的顺序,重新组合。截取字符串时只考虑了“,”间隔,没有考虑其他标点符号,也没有考虑重组的可读性。留待以后改善!using System;using System.Collections.Generic;using System.ComponentModel;usin...
阅读全文
摘要:1、打开文件路径: OpenFileDialog a= new OpenFileDialog(); //new一个方法a.Filter = "(*.et;*.xls;*.xlsx)|*.et;*.xls;*.xlsx|all|*.*"; //删选、设定文件显示类型a.ShowDialog(); /...
阅读全文
摘要:c# 操作txt文件 # 操作txt文件 c#创建文本private const string FILE_NAME = "ErroLog.txt"; public static void WriteFile(string str) ...{ S...
阅读全文
摘要:1)Trim方法string tt=" aaa ";tt=tt.Trim() 去字符串首尾空格的函数tt=tt.TrimEnd() 去掉字符串尾空格tt=tt.TrimStart() 去掉字符串首空格(2)通过ASCII码值去掉字符中的空格由于空格的ASCII码值是32,因此,在去掉字符串中所有的空...
阅读全文
摘要:ACCESS数据库1:CodeSmith选中链接类型是:ADOXSchema2:无密码的Access链接为:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\hh\db.mdb;3:有密码的Access链接:Provider=Microsoft.Jet....
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Window...
阅读全文
摘要:private void button1_Click(object sender, EventArgs e) { string treetxt = treeView1.SelectedNode.Text;//获取到树节点信息 Message...
阅读全文
摘要:第一个显示在listview中using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;usin...
阅读全文
摘要:DataTable 类表示一个内存中数据表。一、DataTable简介 (1)构造函数 DataTable() 不带参数初始化DataTable 类的新实例。 DataTable(string tableName) 用指定的表名...
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Window...
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Window...
阅读全文
浙公网安备 33010602011771号