資源簡介
C開發典型模塊大全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);//服務器端的IP地址
????????????string?port?=?Publec_Class.ServerPort;//端口號
????????????string?revid?=?((this.Tag?as?TreeNode).Tag?as?ClassUserInfo).UserID;//接收ID號
????????????string?sid?=?Publec_Class.UserID;//發送ID
????????????string?msgid?=?Guid.NewGuid().ToString();//設置全局惟一標識
????????????byte[]?data?=?Encoding.Unicode.GetBytes(rich_Input.Rtf);//將當前要發送的信息轉換成二進制流
????????????ClassMsg?msg?=?new?ClassMsg();
????????????msg.sendKind?=?SendKind.SendMsg;//發送的消息
????????????msg.msgCommand?=?MsgCommand.SendToOne;//發送的是單用戶信息
????????????msg.SID?=?sid;//發送ID
????????????msg.RID?=?revid;//接收ID
????????????msg.Data?=?data;//發送的信息
????????????msg.msgID?=?msgid;
????????????if?(data.Length?<=?1024)//如果發送信息的長度小于等于1024
????????????{
????????????????msg.sendState?=?SendState.Single;
????????????????//將信息直接發送給遠程客戶端
????????????????udpsocket.Send(ip?Convert.ToInt32(port)?new?ClassSerializers().SerializeBinary(msg).ToArray());
????????????}
????????????else
????????????{
????????????????ClassMsg?start?=?new?ClassMsg();
????????????????start.sendKind?=?SendKind.SendMsg;
????????????????start.sendState?=?SendState.Start;//文件發送開始命令
????????????????start.msgCommand?=?MsgCommand.SendToOne;//發送單用戶命令
????????????????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);//將二進制流存儲到內存流中
????????????????int?sendlen?=?1024;?//設置文件每塊發送的長度
????????????????long?sunlen?=?(stream.Length);//整個文件的大小
????????????????int?offset?=?0;//設置文件發送的起始位置
????????????????while?(sunlen?>?0)??//分流發送
????????????????{
????????????????????sendlen?=?1024;
????????????????????if?(sunlen?<=?sendlen)
????????????????????????sendlen?=?Convert.ToInt32(sunlen);
????????????????????byte[]?msgdata?=?new?byte[sendlen];
????????????????????stream.Read(msgdata?offset?sendlen);//讀取要發送的字節塊
????????????????????msg.sendState?=?SendState.Sending;//發送狀態為文件發送中
????????????????????msg.Data?=?msgdata;
????????????????????udpsocket.Send(ip?Convert.ToInt32(port)?new?ClassSerializers().SerializeBinary(msg).T
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1048576??2008-11-05?13:10??C#開發典型模塊大全2-13\02\MyQQ\Databa
?????文件????1048576??2008-11-05?13:10??C#開發典型模塊大全2-13\02\MyQQ\Databa
?????文件???????1498??2007-12-04?21:02??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\0.bmp
?????文件???????1498??2007-12-05?14:02??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\1.bmp
?????文件??????13198??2007-12-17?14:14??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Chat.cs
?????文件??????28506??2007-12-17?14:14??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Chat.Designer.cs
?????文件?????111156??2007-12-17?14:14??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Chat.resx
?????文件??????19562??2008-08-25?17:59??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Client.cs
?????文件???????8955??2008-08-25?17:59??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Client.Designer.cs
?????文件??????49122??2008-08-25?17:59??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Client.resx
?????文件???????5441??2008-08-25?16:13??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Logon.cs
?????文件???????6969??2008-08-25?16:13??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Logon.Designer.cs
?????文件?????373599??2008-08-25?16:13??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_Logon.resx
?????文件???????3717??2007-12-17?09:04??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_SerSetup.cs
?????文件???????9839??2007-12-17?09:04??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_SerSetup.Designer.cs
?????文件???????6012??2007-12-17?09:04??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\F_SerSetup.resx
?????文件???????4744??2007-12-05?13:50??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\MyQQClient.csproj
?????文件????????472??2007-11-27?23:08??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Program.cs
?????文件???????1168??2007-11-27?23:00??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Properties\AssemblyInfo.cs
?????文件???????3328??2007-12-13?16:39??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Properties\Resources.Designer.cs
?????文件???????6403??2007-12-04?22:42??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Properties\Resources.resx
?????文件???????1106??2007-12-13?16:39??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Properties\Settings.Designer.cs
?????文件????????249??2007-11-27?23:00??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient\Properties\Settings.settings
?????文件???????2569??2007-12-05?14:44??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient.sln
????..A..H.?????55808??2008-05-07?17:10??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQClient.suo
?????文件??????15426??2008-07-11?16:18??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQServer\F_Server.cs
?????文件???????8367??2008-06-27?18:16??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQServer\F_Server.Designer.cs
?????文件???????6407??2008-06-27?18:16??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQServer\F_Server.resx
?????文件???????4219??2007-12-04?23:55??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQServer\MyQQServer.csproj
?????文件????????472??2007-11-27?20:34??C#開發典型模塊大全2-13\02\MyQQ\MyQQClient\Backup\MyQQServer\Program.cs
............此處省略760個文件信息
評論
共有 條評論