using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
namespace LANChatTool
...{
/**//// <summary>
/// Form_Main 的摘要说明。
/// </summary>
public class Form_Main : System.Windows.Forms.Form
...{
private string str_LocalIPAddress;//本地主机IP地址,用于判断接收到的消息是否是发给自己的
private string str_LocalPet;//本地昵称
private string str_TargetIP;//目标IP地址,用于让别人判断接收到的消息是否是发给他的
private Byte[] Byte_Info;//承载消息
private string str_Info;//承载消息
private UdpClient UdpClient_Receive;//处理消息
private Thread Thread_Receive;//控制接收信息的线程
private string GroupAddress;//聊天组地址
private bool bool_CheckBox_Pirvate_State;//保存this.CheckBox_Pirvate.Checked状态
private UdpClient UdpClient_Send;//发送消息
private bool bool_UdpClient_Send_Connected;//指示this.UdpClient_Send是否已经连接
private string str_TargetPet;/**//////////记录聊天对象
//////////////////////////////////////////////////////
private System.Windows.Forms.ListView listView_Pet_IP;
private System.Windows.Forms.ColumnHeader Column_Pet;
private System.Windows.Forms.ColumnHeader Column_IPAddress;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox_Pet;
private System.Windows.Forms.Button button_StartChat;
private System.Windows.Forms.Label label_Port;
private System.Windows.Forms.TextBox textBox_Port;
private System.Windows.Forms.Label label_Group;
private System.Windows.Forms.TextBox textBox_IPAddress;
private System.Windows.Forms.Label label_Times;
private System.Windows.Forms.RichTextBox richTextBox_Public;
private System.Windows.Forms.RichTextBox richTextBox_Private;
private System.Windows.Forms.TextBox textBox_Message;
private System.Windows.Forms.Button button_Send;
private System.Windows.Forms.Label label_TargetPet;
private System.Windows.Forms.CheckBox checkBox_SendAll;
private System.Windows.Forms.CheckBox checkBox_Private;
private System.Windows.Forms.TextBox textBox_TargetPet;
private System.Windows.Forms.ComboBox comboBox_JumpTime;
private System.Windows.Forms.HelpProvider helpProvider1;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.NotifyIcon notifyIcon_LAN_ChatTool;
private System.Windows.Forms.ContextMenu contextMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.ComponentModel.IContainer components;
public Form_Main()
...{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/**//// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
...{
if( disposing )
...{
if (components != null)
...{
components.Dispose();
}
}
base.Dispose( disposing );
}
Windows 窗体设计器生成的代码#region Windows 窗体设计器生成的代码
/**//// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
...{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form_Main));
this.listView_Pet_IP = new System.Windows.Forms.ListView();
this.Column_Pet = new System.Windows.Forms.ColumnHeader();
this.Column_IPAddress = new System.Windows.Forms.ColumnHeader();
this.label1 = new System.Windows.Forms.Label();
this.textBox_Pet = new System.Windows.Forms.TextBox();
this.button_StartChat = new System.Windows.Forms.Button();
this.label_Port = new System.Windows.Forms.Label();
this.textBox_Port = new System.Windows.Forms.TextBox();
this.label_Group = new System.Windows.Forms.Label();
this.textBox_IPAddress = new System.Windows.Forms.TextBox();
this.label_Times = new System.Windows.Forms.Label();
this.richTextBox_Public = new System.Windows.Forms.RichTextBox();
this.richTextBox_Private = new System.Windows.Forms.RichTextBox();
this.textBox_Message = new System.Windows.Forms.TextBox();
this.button_Send = new System.Windows.Forms.Button();
this.label_TargetPet = new System.Windows.Forms.Label();
this.textBox_TargetPet = new System.Windows.Forms.TextBox();
this.checkBox_SendAll = new System.Windows.Forms.CheckBox();
this.checkBox_Private = new System.Windows.Forms.CheckBox();
this.comboBox_JumpTime = new System.Windows.Forms.ComboBox();
this.helpProvider1 = new System.Windows.Forms.HelpProvider();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.notifyIcon_LAN_ChatTool = new System.Windows.Forms.NotifyIcon(this.components);
this.contextMenu1 = new System.Windows.Forms.ContextMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.SuspendLayout();
//
// listView_Pet_IP
//
this.listView_Pet_IP.AllowColumnReorder = true;
this.listView_Pet_IP.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] ...{
this.Column_Pet,
this.Column_IPAddress});
this.listView_Pet_IP.Enabled = false;
this.listView_Pet_IP.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.listView_Pet_IP.FullRowSelect = true;
this.helpProvider1.SetHelpString(this.listView_Pet_IP, "显示在线信息。");
this.listView_Pet_IP.Location = new System.Drawing.Point(344, 0);
this.listView_Pet_IP.MultiSelect = false;
this.listView_Pet_IP.Name = "listView_Pet_IP";
this.helpProvider1.SetShowHelp(this.listView_Pet_IP, true);
this.listView_Pet_IP.Size = new System.Drawing.Size(224, 400);
this.listView_Pet_IP.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.listView_Pet_IP.TabIndex = 5;
this.toolTip1.SetToolTip(this.listView_Pet_IP, "显示在线信息。");
this.listView_Pet_IP.View = System.Windows.Forms.View.Details;
this.listView_Pet_IP.DoubleClick += new System.EventHandler(this.listView1_DoubleClick);
this.listView_Pet_IP.Leave += new System.EventHandler(this.listView_Pet_IP_Leave);
//
// Column_Pet
//
this.Column_Pet.Text = "昵称";
this.Column_Pet.Width = 100;
//
// Column_IPAddress
//
没有合适的资源?快使用搜索试试~ 我知道了~
五子棋(聊天)网络对战
共104个文件
cs:24个
pdb:19个
dll:13个
需积分: 9 23 下载量 18 浏览量
2007-10-10
10:42:11
上传
评论 1
收藏 738KB RAR 举报
温馨提示
这是一个利用udp,tcp简单实现网络聊天和游戏得对战平台,系统还有很多不完善的地方,现在只是提供一个例子,不过大部分功能还是完成了,在这里发表出来供和我一样得菜鸟看看(软件环境,.net2003,语言c#,双击用户列表可以进行游戏)
资源推荐
资源详情
资源评论
收起资源包目录
五子棋(聊天)网络对战 (104个子文件)
UserPlayGameFr.cs 20KB
Form1.cs 9KB
PaintQiPan.cs 6KB
Servers.cs 5KB
Client.cs 4KB
Form1.cs 4KB
WuziRule.cs 3KB
UDPClient.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
MessageBean.cs 2KB
Form1.cs 1KB
ServerChat.cs 937B
ClientMessageBean.cs 927B
CtoC.cs 843B
Mypoint.cs 327B
Mypoint.cs 325B
ClientChat.cs 222B
UserLogin.cs 222B
ClientForm.csproj 6KB
ChatItem.csproj 5KB
ServerClient.csproj 5KB
GameWuzi.csproj 4KB
Clients.csproj 4KB
Servers.csproj 4KB
DataAccess.csproj 4KB
Servers.dll 20KB
Servers.dll 20KB
Clients.dll 20KB
GameWuzi.dll 20KB
Clients.dll 20KB
Clients.dll 20KB
GameWuzi.dll 20KB
GameWuzi.dll 20KB
Servers.dll 20KB
Clients.dll 20KB
Servers.dll 20KB
DataAccess.dll 16KB
DataAccess.dll 16KB
ClientForm.exe 132KB
ClientForm.exe 132KB
ServerClient.exe 28KB
ServerClient.exe 28KB
ChatItem.exe 16KB
ChatItem.exe 16KB
Rock 3.gif 90KB
qi.gif 84KB
App.ico 1KB
App.ico 1KB
App.ico 1KB
ClientForm.pdb 40KB
ClientForm.pdb 40KB
Servers.pdb 28KB
Servers.pdb 28KB
Servers.pdb 28KB
Servers.pdb 28KB
Clients.pdb 26KB
Clients.pdb 26KB
Clients.pdb 26KB
Clients.pdb 26KB
GameWuzi.pdb 24KB
GameWuzi.pdb 24KB
GameWuzi.pdb 24KB
ServerClient.pdb 20KB
ServerClient.pdb 20KB
ChatItem.pdb 14KB
ChatItem.pdb 14KB
DataAccess.pdb 12KB
DataAccess.pdb 12KB
ClientForm.projdata 20KB
Clients.projdata 14KB
ServerClient.projdata 6KB
Servers.projdata 5KB
GameWuzi.projdata 5KB
ChatItem.projdata 2KB
DataAccess.projdata 1KB
ClientForm.UserPlayGameFr.resources 98KB
ServerClient.Form1.resources 9KB
ClientForm.Form1.resources 5KB
ChatItem.Form1.resources 188B
UserPlayGameFr.resx 144KB
Form1.resx 12KB
Form1.resx 8KB
Form1.resx 2KB
ChatItem.sln 4KB
ChatItem.suo 13KB
我做的基于TCPIP协议中UDP协议和线程技术的局域网聊天工具(C#.NET 2003) .txt 46KB
使用 UDPClient 生成聊天客户端2.txt 8KB
UDP网络通信的简单例子 .txt 7KB
使用 UDPClient 生成聊天客户端1.txt 5KB
在.net中使用Udp协议创建简单的聊天程序.txt 3KB
Net高效UDP异步编程 .txt 3KB
Servers.csproj.user 2KB
ClientForm.csproj.user 2KB
Clients.csproj.user 2KB
共 104 条
- 1
- 2
资源评论
liufei2569
- 粉丝: 0
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功