文章分类 -  C#

包括C#的一些基本概念,网络,线程等等
摘要:1 在窗体Form_Load里面初始化TreeView /**//// /// 初始化TreeView /// private void InitTreeview() { try { treeView1.CheckBoxes = true; ... 阅读全文
posted @ 2006-04-05 15:58 jhtchina 阅读(1472) 评论(0) 推荐(0)
摘要:程序主窗体如下: /**//// /// 上传文件到Ftp 上传上去的文件名称是 Entclass_ftpfilename.Guid+Entclass_ftpfilename.Type /// /// 文件名称类里面的文件上传 /// private bool fun_Transfer(string newFtp... 阅读全文
posted @ 2006-04-05 14:54 jhtchina 阅读(820) 评论(0) 推荐(0)
摘要:然后建立文件上传窗体代码: using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Threading;using DevExpress.XtraEditors;using System.Net;usi... 阅读全文
posted @ 2006-04-05 14:50 jhtchina 阅读(930) 评论(0) 推荐(0)
摘要:把文件上传到Ftp上面首先建立配置文件文件名称App.config: 建立Ftp操作基类 文件名称:FTPClient.cs using System;using System.Net;using System.IO;using System.Text;using System.Net.Sockets;using DevExpress.XtraEditors;namespace Wind... 阅读全文
posted @ 2006-04-05 14:31 jhtchina 阅读(2417) 评论(15) 推荐(0)
摘要:select Guid,RelicGuid,SerialNumber,Name,AttachId=(case AttachId when 0 then '原始图' when 1 then '缩略图' when 2 then '浏览图' end)from rsDrawing 使用的时候看一下,看帮助会很清晰的如果不显示1900-1-1日的日期 (case MadeDate when '1900/01... 阅读全文
posted @ 2006-03-30 09:07 jhtchina 阅读(907) 评论(0) 推荐(1)
摘要:-------------------------------------------------------------- XmlDocument docA = new XmlDocument(); docA.Load("A文件"); XmlDocument docB = new XmlDocument(); docB.Load("B文件"); docA.Firs... 阅读全文
posted @ 2006-03-16 15:41 jhtchina 阅读(968) 评论(0) 推荐(0)
摘要:private void RotateTransform_Click(object sender, System.EventArgs e) { Graphics graphics=this.CreateGraphics(); graphics.Clear(Color.White); //装入图片 ... 阅读全文
posted @ 2006-03-16 12:58 jhtchina 阅读(5144) 评论(2) 推荐(2)
摘要:引用:http://libiyang.cnblogs.com/archive/2006/01/19/320411.html使用运行通过log4net是一个apache基金资助的项目log4j的.net移植版本,它是一个.net的dll,可以方便的加载到开发项目中,实现程序调试和运行的时候的日志信息输入,比.net自己提供的debug类和trace类要提供更多功能。整个讨论分为两部分,第一部分是ho... 阅读全文
posted @ 2006-03-03 15:36 jhtchina 阅读(526) 评论(0) 推荐(0)
摘要:using System.IO;using System.Drawing.Imaging;public class imgConvert{ private void BMPToJPG(string bmpFileName,string jpgFileName) { System... 阅读全文
posted @ 2006-02-17 15:16 jhtchina 阅读(913) 评论(0) 推荐(0)
摘要:SQLDMO(SQL Distributed Management Objects,SQL分布式管理对象)封装 Microsoft SQL Server 2000 数据库中的对象。SQL-DMO 允许用支持自动化或 COM 的语言编写应用程序,以管理 SQL Server 安装的所有部分。SQL-DMO 是 SQL Server 2000 中的 SQL Server 企业管理器所使用的应用程序接口... 阅读全文
posted @ 2006-02-13 11:19 jhtchina 阅读(929) 评论(10) 推荐(1)
摘要:其实现的原理就是先将汉字转化成为内码,然后通过内码和拼音的对照来查找。 public class chs2py {/**//**//**//// ///将汉字转换成为拼音 ///作者: ///完成于: /// private static int[] pyvalue=new int[]{-20319,-20317,-20304,-20295,-20292,-20283,-2026... 阅读全文
posted @ 2006-02-10 15:38 jhtchina 阅读(1294) 评论(1) 推荐(0)
摘要:各进制之间的转换各进制之间的转换#region 各进制之间的转换 public static string TenConvertToOther(int num,int type) { //1)10进制转换为2,8,10,16进制 //2)numm是十进制数 //3)type是转换类型,可以是2,8,10,... 阅读全文
posted @ 2006-01-15 02:23 jhtchina 阅读(331) 评论(0) 推荐(0)
摘要:private void MainWindow_Load(object sender, System.EventArgs e) { Process[] processes=Process.GetProcessesByName("MYEXENAME"); if( processes != null) { if( (processes.Length)== 2) ... 阅读全文
posted @ 2005-11-17 11:27 jhtchina 阅读(415) 评论(0) 推荐(0)
摘要:using System;using System.Runtime.InteropServices; class shoutdown{ [StructLayout(LayoutKind.Sequential, Pack=1)] internal struct TokPriv1Luid { public int Count; public long Luid; ... 阅读全文
posted @ 2005-11-17 11:21 jhtchina 阅读(287) 评论(0) 推荐(0)
摘要://把Jpg文件保存为Xml文件 /**//*--------------------------------------------*/ try { XmlDocument myXmlDoc = new XmlDocument(); myXmlD... 阅读全文
posted @ 2005-10-11 15:37 jhtchina 阅读(4799) 评论(0) 推荐(0)
摘要:现在3层开发模式里面表示层, 业务逻辑层, 数据访问层 现在把数据访问层封装起来做为Class ,实现对数据进行访问的数据库操作类下面是结构组件图先从一个程序说起,再慢慢深入的理解数据操作类的实现 private void ConnectionDataBase(){//连接数据库CommonInterface pObj_Comm=CommonFactory.CreateInstance(Comm... 阅读全文
posted @ 2005-09-28 00:00 jhtchina 阅读(2658) 评论(0) 推荐(0)
摘要:以前做B/S ,现在改C/S 方法不是很一样Form1 里面加入 set 访问器 string str_temp1;public string str_test{set{str_temp1=value;}}弹出Form2窗体 private void button1_Click(object sender, System.EventArgs e) { Form2 frm2=new Form2... 阅读全文
posted @ 2005-07-29 11:41 jhtchina 阅读(1952) 评论(2) 推荐(0)
摘要:有时候遇到这样的情况,用户在客户端编辑数据,添加数据.然后整体更新到数据库里面数据库结构: CREATE TABLE [Test_Base] ( [CodeZZB] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL , [InterName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NU... 阅读全文
posted @ 2005-07-06 10:06 jhtchina 阅读(2604) 评论(0) 推荐(0)
摘要:题目: 内部网络扫描程序参考:http://www.microsoft.com/china/community/program/originalarticles/TechDoc/Csharpnet.mspx如下图:实现功能:1 当前本机的连机状态.2 计算机名称--->IP; IP--->计算机名称3 网段扫描实现过程:需要调用的引用: using System;using Syste... 阅读全文
posted @ 2005-06-29 14:09 jhtchina 阅读(1426) 评论(1) 推荐(0)
摘要:程序引用来自:http://community.csdn.net/Expert/topic/3265/3265446.xml?temp=9.060305E-02 1private void ShowHideWindow(bool isShow) 2{ 3 if(isShow) 4 { 5 if(this.ShowInTaskbar==false) 6 {... 阅读全文
posted @ 2005-06-28 09:17 jhtchina 阅读(1229) 评论(0) 推荐(0)