資源簡(jiǎn)介
C開發(fā)典型模塊大全2-13.rar

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Net;
using?System.Net.Sockets;
using?QQClass;
using?System.IO;
namespace?MyQQClient
{
????public?partial?class?F_Chat?:?Form
????{
????????public?UDPSocket?udpsocket;
????????public?ClassForms?FormList;
????????public?bool?Voiding;
????????public?bool?SendViod;
????????cVideo?viodeo;
????????public?F_Chat()
????????{
????????????InitializeComponent();
????????}
????????private?void?button_Send_Click(object?sender?EventArgs?e)
????????{
????????????IPAddress?ip?=?IPAddress.Parse(Publec_Class.ServerIP);//服務(wù)器端的IP地址
????????????string?port?=?Publec_Class.ServerPort;//端口號(hào)
????????????string?revid?=?((this.Tag?as?TreeNode).Tag?as?ClassUserInfo).UserID;//接收ID號(hào)
????????????string?sid?=?Publec_Class.UserID;//發(fā)送ID
????????????string?msgid?=?Guid.NewGuid().ToString();//設(shè)置全局惟一標(biāo)識(shí)
????????????byte[]?data?=?Encoding.Unicode.GetBytes(rich_Input.Rtf);//將當(dāng)前要發(fā)送的信息轉(zhuǎn)換成二進(jìn)制流
????????????ClassMsg?msg?=?new?ClassMsg();
????????????msg.sendKind?=?SendKind.SendMsg;//發(fā)送的消息
????????????msg.msgCommand?=?MsgCommand.SendToOne;//發(fā)送的是單用戶信息
????????????msg.SID?=?sid;//發(fā)送ID
????????????msg.RID?=?revid;//接收ID
????????????msg.Data?=?data;//發(fā)送的信息
????????????msg.msgID?=?msgid;
????????????if?(data.Length?<=?1024)//如果發(fā)送信息的長(zhǎng)度小于等于1024
????????????{
????????????????msg.sendState?=?SendState.Single;
????????????????//將信息直接發(fā)送給遠(yuǎn)程客戶端
????????????????udpsocket.Send(ip?Convert.ToInt32(port)?new?ClassSerializers().SerializeBinary(msg).ToArray());
????????????}
????????????else
????????????{
????????????????ClassMsg?start?=?new?ClassMsg();
????????????????start.sendKind?=?SendKind.SendMsg;
????????????????start.sendState?=?SendState.Start;//文件發(fā)送開始命令
????????????????start.msgCommand?=?MsgCommand.SendToOne;//發(fā)送單用戶命令
????????????????start.SID?=?sid;
????????????????start.RID?=?revid;
????????????????start.Data?=?Encoding.Unicode.GetBytes(““);
????????????????start.msgID?=?msgid;
????????????????udpsocket.Send(ip?Convert.ToInt32(port)?new?ClassSerializers().SerializeBinary(start).ToArray());
????????????????MemoryStream?stream?=?new?MemoryStream(data);//將二進(jìn)制流存儲(chǔ)到內(nèi)存流中
????????????????int?sendlen?=?1024;?//設(shè)置文件每塊發(fā)送的長(zhǎng)度
????????????????long?sunlen?=?(stream.Length);//整個(gè)文件的大小
????????????????int?offset?=?0;//設(shè)置文件發(fā)送的起始位置
????????????????while?(sunlen?>?0)??//分流發(fā)送
????????????????{
????????????????????sendlen?=?1024;
????????????????????if?(sunlen?<=?sendlen)
????????????????????????sendlen?=?Convert.ToInt32(sunlen);
????????????????????byte[]?msgdata?=?new?byte[sendlen];
????????????????????stream.Read(msgdata?offset?sendlen);//讀取要發(fā)送的字節(jié)塊
????????????????????msg.sendState?=?SendState.Sending;//發(fā)送狀態(tài)為文件發(fā)送中
????????????????????msg.Data?=?msgdata;
????????????????????udpsocket.Send(ip?Convert.ToInt32(port)?new?ClassSerializers().SerializeBinary(msg).T
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????1048576??2008-11-05?13:10??C#開發(fā)典型模塊大全2-13\02\MyQQ\Databa
?????文件????1048576??2008-11-05?13:10??C#開發(fā)典型模塊大全2-13\02\MyQQ\Databa
?????文件???????1498??2007-12-04?21:02??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\0.bmp
?????文件???????1498??2007-12-05?14:02??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\1.bmp
?????文件??????13198??2007-12-17?14:14??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Chat.cs
?????文件??????28506??2007-12-17?14:14??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Chat.Designer.cs
?????文件?????111156??2007-12-17?14:14??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Chat.resx
?????文件??????19562??2008-08-25?17:59??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Client.cs
?????文件???????8955??2008-08-25?17:59??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Client.Designer.cs
?????文件??????49122??2008-08-25?17:59??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Client.resx
?????文件???????5441??2008-08-25?16:13??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Logon.cs
?????文件???????6969??2008-08-25?16:13??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Logon.Designer.cs
?????文件?????373599??2008-08-25?16:13??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Logon.resx
?????文件???????3717??2007-12-17?09:04??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_SerSetup.cs
?????文件???????9839??2007-12-17?09:04??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_SerSetup.Designer.cs
?????文件???????6012??2007-12-17?09:04??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_SerSetup.resx
?????文件???????4744??2007-12-05?13:50??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\MyQQClient.csproj
?????文件????????472??2007-11-27?23:08??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Program.cs
?????文件???????1168??2007-11-27?23:00??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Properties\AssemblyInfo.cs
?????文件???????3328??2007-12-13?16:39??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Properties\Resources.Designer.cs
?????文件???????6403??2007-12-04?22:42??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Properties\Resources.resx
?????文件???????1106??2007-12-13?16:39??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Properties\Settings.Designer.cs
?????文件????????249??2007-11-27?23:00??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Properties\Settings.settings
?????文件???????2569??2007-12-05?14:44??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient.sln
????..A..H.?????55808??2008-05-07?17:10??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient.suo
?????文件??????15426??2008-07-11?16:18??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQServer\F_Server.cs
?????文件???????8367??2008-06-27?18:16??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQServer\F_Server.Designer.cs
?????文件???????6407??2008-06-27?18:16??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQServer\F_Server.resx
?????文件???????4219??2007-12-04?23:55??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQServer\MyQQServer.csproj
?????文件????????472??2007-11-27?20:34??C#開發(fā)典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQServer\Program.cs
............此處省略760個(gè)文件信息
評(píng)論
共有 條評(píng)論