简单的多人聊天系统

简单的多人聊天系统

ID:32682730

大小:55.00 KB

页数:24页

时间:2019-02-14

简单的多人聊天系统_第1页
简单的多人聊天系统_第2页
简单的多人聊天系统_第3页
简单的多人聊天系统_第4页
简单的多人聊天系统_第5页
资源描述:

《简单的多人聊天系统》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库

1、/******************8ChatServer:**************************/usingSystem;usingSystem.Drawing;usingSystem.Collections;usingSystem.ComponentModel;usingSystem.Windows.Forms;usingSystem.Data;usingSystem.Threading;usingSystem.Net.Sockets;usingSystem.Net;namespaceChat_Server{ ///

 ///Form1的摘要说明。 //

2、/

 publicclassForm1:System.Windows.Forms.Form { /// ///必需的设计器变量。 /// privateSystem.ComponentModel.Containercomponents=null; staticintlistenport=6666; Socketclientsocket; privateSystem.Windows.Forms.ListBoxlbClients; ArrayListclients; privateSystem.Windows.Forms.Buttonbu

3、tton1; Threadclientservice; privateSystem.Windows.Forms.Labellabel1; ThreadthreadListen; publicForm1() {    InitializeComponent(); } ///

 ///清理所有正在使用的资源。 /// protectedoverridevoidDispose(booldisposing) {  if(disposing)  {      if(clientservice!=null)   {    clientservice.Abort();

4、   }   if(threadListen!=null)   {    try    {     threadListen.Abort();    }    catch(Exceptionex)    {     threadListen=null;    }   }      if(components!=null)   {    components.Dispose();   }  }  base.Dispose(disposing);   } #regionWindows窗体设计器生成的代码 ///

 ///设计器支持所需的方法-不要使用代码编辑器修改 ///此方法

5、的内容。 ///

 privatevoidInitializeComponent() {  this.lbClients=newSystem.Windows.Forms.ListBox();  this.button1=newSystem.Windows.Forms.Button();  this.label1=newSystem.Windows.Forms.Label();  this.SuspendLayout();  //  //lbClients  //  this.lbClients.ItemHeight=12;  this.lbClients.Location

6、=newSystem.Drawing.Point(16,24);  this.lbClients.Name="lbClients";  this.lbClients.Size=newSystem.Drawing.Size(184,268);  this.lbClients.TabIndex=0;  //  //button1  //  this.button1.Location=newSystem.Drawing.Point(272,56);  this.button1.Name="button1";  this.button1.TabIndex=1;  this.button1.Text

7、="button1";  this.button1.Click+=newSystem.EventHandler(this.button1_Click);  //  //label1  //  this.label1.Location=newSystem.Drawing.Point(240,136);  this.label1.Name="label1";  this.label1.Size=newSystem.Drawi

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。