上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 26 下一页
摘要: Winform特有的功能如何保存当前窗口中所填的信息,方便下次打开 还是这样的,实现如下:首先,在当前项目中打开Properties——Settings.settings,然后点击,添加字段;其次,再点击界面中控件的属性,然后选择ApplicationSettings属性,选Text属性,选择刚刚设置的字段最后,用一个事件来实现数据保存,代码:Settings.Default.Save();实现了需要的功能 阅读全文
posted @ 2013-02-21 16:49 蓬莱仙羽 阅读(341) 评论(0) 推荐(0)
摘要: using System;using System.Windows.Forms;namespace TreeView控件{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { treeView1.Nodes.Clear(); //每一个节点都是一个TreeNode的一个对象 TreeNode nodeChina = new TreeNode(); nodeChina.Text = 阅读全文
posted @ 2013-02-20 22:31 蓬莱仙羽 阅读(144) 评论(0) 推荐(0)
摘要: /// <summary> /// 复合查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnCheck_Click(object sender, EventArgs e) { //方法一 //StringBuilder sb = new StringBuilder(); //sb.Append("select * from T_Cus 阅读全文
posted @ 2013-02-20 16:30 蓬莱仙羽 阅读(159) 评论(0) 推荐(0)
摘要: 项目命名规则:方法名首字母大写,参数名、变量名第一个字母小写,其它字母大写。//驼峰命名法ViewBag后面单词大写。千万不要在循环访问数据库。数据能一次取出来就一次取出来。放到内在中处理。MVC中保持状态可以用ViewBag来保存。问题1、ajax重复提交问题:JS动态创建html时.有时候 \" 和'不一样。用log 记录日志的时候一般都是记录关键的步骤。空格 在IE和firfox 解析不一样。切记document.getElementById('').getElementsByTagName("a");这样在IE里面可以解析,但是在火 阅读全文
posted @ 2013-02-20 10:43 蓬莱仙羽 阅读(115) 评论(0) 推荐(0)
摘要: 当我们遇到要处理汉字和拼音之间的转化关系怎么办?如和用程序来实现?我搜索到一个ChineseChar开发包,然后实现了这一难题using System;using Microsoft.International.Converters.PinYinConverter;namespace 拼音基础{ class Program { static void Main(string[] args) { #region 判断是否为同音字 ChineseChar chineseChar = new ChineseChar('微'); Console.WriteLine("Stro 阅读全文
posted @ 2013-02-19 14:55 蓬莱仙羽 阅读(210) 评论(0) 推荐(0)
摘要: using System;using System.Windows.Forms;using System.Security.Cryptography;using System.IO;namespace 计算文件的MD5{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { //创建与服务器的连接 FtpClient fc = new FtpClient("127.0.0 阅读全文
posted @ 2013-02-17 21:27 蓬莱仙羽 阅读(527) 评论(0) 推荐(0)
摘要: //FTP开源封装的类using System;using System.Collections.Generic;using System.Net;using System.IO;namespace FTP{ /// <summary> /// FTP客户端操作类 /// </summary> public class FtpClient { #region 构造函数 /// <summary> /// 创建FTP工具 /// <para> /// 默认不使用SSL,使用二进制传输方式,使用被动模式 /// </para> /// & 阅读全文
posted @ 2013-02-16 21:30 蓬莱仙羽 阅读(1050) 评论(0) 推荐(0)
摘要: C#操作Excel,如果格式是xlsx的就用openXML来操作,如果是xls的就用NPOI来操作应该讲第三方组件,单独存在一个lib文件夹中,然后添加引用,这样组件就能随着项目走xlsx实际上是一个压缩文件using System;using System.Windows.Forms;using System.IO;using NPOI.HSSF.UserModel;namespace NPOI测试{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } /// <summary> 阅读全文
posted @ 2013-02-05 16:00 蓬莱仙羽 阅读(644) 评论(0) 推荐(0)
摘要: using System;using System.Text.RegularExpressions;using System.Net;namespace 正则表达式检测字符串{ class Program { static void Main(string[] args) { Console.WriteLine("请输入字符串:"); string s = Console.ReadLine(); if (GF_IsOk.IsExistHanZi(s)) { Console.Write("包含汉字"); } else { Console.Write(&qu 阅读全文
posted @ 2013-02-05 14:51 蓬莱仙羽 阅读(236) 评论(0) 推荐(0)
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf- 阅读全文
posted @ 2013-02-04 16:34 蓬莱仙羽 阅读(159) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 26 下一页