随笔分类 - WinForm
摘要:看了好多资料,感觉大部分三层架构都是指B/S结构而言,而最近看了一些相关的资料,正好自己手头也接了一个项目,想了一下,决定用如下方式对C/S架构分层.1.通信层:其实也是就数据库连接,但是作为一个基本的封装类,与B/S不同,要有自己的特点,包括对事务的执行,对网络状况的监测,在闪断的情况下能够自行重连等.2.数据层:由数据库连接生成的各种DataSet DataTable DataAdopter实...
阅读全文
摘要:在多线程或单线程任务中,让线程带传入参数一直是个麻烦的问题,通常有种方法就是以类,对像的变量来传参数,这种方法理解上很简单不过在某些场合使用很麻烦,这里就不介绍了,我们主要介绍一种.NET2.0中新增加的带参数运行线程的方法,示例程序如下:ParameterizedThreadStart ParStart = new ParameterizedThreadStart(ThreadMethod); ...
阅读全文
摘要:C#Control内 public delegate void SetExRichReciveHandel(string str); public void SetExRichRecive(string str) { if (this.exRichRecive.InvokeRequired) { SetExRichReciveHandel SPBH = new SetExRichReciveHan...
阅读全文
摘要:usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Net;usingSystem.Net.Sockets;usingSystem.Windows.Forms;usingSystem.Diagnostics;usingSystem.Runtime.InteropServices;namespaceClie...
阅读全文
摘要:staticvoidMain(string[]args){//打开登录窗口LoginFormlg=newLoginForm();if(lg.ShowDialog()==DialogResult.OK){Application.Run(newMainForm());//打开你指定的窗口}}登录窗口(LoginForm)中在你完成密码验证代码后加上this.DialogResult=DialogRes...
阅读全文

浙公网安备 33010602011771号