聊天小程序


这是一款聊天的小程序,适合初学者学习下哦,
资源截图
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CCWin;
using CCWin.SkinControl;
using System.Runtime.InteropServices;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Threading;
using ESPlus.Rapid;
using GG.Core;
using ESBasic.objectManagement.Forms;
using ESPlus.Application.P2PSession.Passive;
using ESPlus.FileTransceiver;
using ESBasic;
using ImageCapturerLib;

namespace GG
{
    public partial class ChatForm : CCSkinMain IManagedForm
    {
        private string title_FileTransfer = “文件传送“;
        private FileTransferingViewer fileTransferingViewer = new FileTransferingViewer();
        private EmotionForm emotionForm;
        private IRapidPassiveEngine rapidPassiveEngine;
       
        private bool friendOffline = false;
        private string myNickName = ““;
        private string friendNickName = ““;
        private string friendID = ““;          
       
        #region IManagedForm Member
        public string FormID
        {
            get { return this.friendID; }
        } 
        #endregion

        public ChatForm(IRapidPassiveEngine engine string _myNickName ChatListSubItem item)
        {
            this.rapidPassiveEngine = engine;
            this.myNickName = _myNickName;
            this.friendNickName = item.NicName;
            this.friendID = item.ID.ToString();          
            InitializeComponent();           

            this.Text = “与 “ + this.friendNickName + “ 对话中“;
            this.labelFriendName.Text = friendNickName;
            this.labelFriendSignature.Text = item.PersonalMsg;
            this.panelFriendHeadImage.BackgroundImage = item.HeadImage;
            this.textBoxSend.Focus();

            List emotionList = new List();
            foreach (Image emotion in this.imageList1.Images)
            {
                emotionList.Add(emotion);
            }
            
            this.emotionForm = new EmotionForm();
            this.emotionForm.Load += new EventHandler(emotionForm_Load);        
            this.emotionForm.Initialize(emotionList);
            this.emotionForm.Emotionclicked += new ESBasic.CbGeneric(emotionForm_Clicked);
            this.emotionForm.Visible = false;       
     
            //文件传送
            this.fileTransferingViewer.Initialize(this.friendID this.rapidPassiveEngine.FileOutter);
            this.fileTransferingViewer.FileTransStarted += new CbGeneric(fileTransferingViewer1_FileTransStarted);
            this.fileTransferingViewer.FileTransDisruptted += new CbGeneric(fileTransferingViewer1_FileTransDisruptted);
            this.fileTransferingViewer.FileTransCompleted += new CbGeneric(fileTransferingViewer1_FileTransCompleted);
            this.f

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        2364  2013-08-08 11:33  51Aspx源码必读.txt
     目录           0  2013-08-08 11:34  Dlls
     文件      384000  2013-07-10 16:41  DllsESBasic.dll
     文件      187392  2013-07-12 08:52  DllsESframework.dll
     文件      144248  2013-07-12 08:50  DllsESframework.xml
     文件      265728  2013-07-12 08:52  DllsESPlus.dll
     文件      167506  2013-07-12 08:50  DllsESPlus.xml
     文件       76800  2013-07-29 16:51  DllsImageCapturerLib.dll
     文件      191488  2012-10-31 10:14  DllsPaintframework.dll
     文件      529920  2013-04-28 15:19  DllsSkinForm.dll
     目录           0  2013-08-08 11:34  GG
     文件        4286  2013-08-07 15:55  GGAll_logo32-xp.ico
     文件       70977  2013-07-30 11:26  GGChatForm.Designer.cs
     文件       22665  2013-07-30 11:26  GGChatForm.cs
     文件      633283  2013-07-29 16:20  GGChatForm.resx
     文件        1947  2013-07-30 11:26  GGEmotionForm.Designer.cs
     文件        3989  2013-07-30 11:26  GGEmotionForm.cs
     文件        5817  2013-07-16 14:24  GGEmotionForm.resx
     目录           0  2013-08-08 11:34  GGFileTransferingViewer
     文件        7766  2013-07-30 11:26  GGFileTransferingViewerFileTransferItem.Designer.cs
     文件        9531  2013-07-30 11:26  GGFileTransferingViewerFileTransferItem.cs
     文件       19408  2013-07-26 11:50  GGFileTransferingViewerFileTransferItem.resx
     文件        2488  2013-07-30 11:26  GGFileTransferingViewerFileTransferingViewer.Designer.cs
     文件       18937  2013-07-30 11:26  GGFileTransferingViewerFileTransferingViewer.cs
     文件        5814  2013-07-26 09:33  GGFileTransferingViewerFileTransferingViewer.resx
     文件        1554  2013-07-30 11:26  GGFileTransferingViewerIFileTransferingViewer.cs
     文件         463  2011-11-10 09:49  GGFileTransferingViewervssver2.scc
     文件       15360  2013-08-07 15:56  GGGG.csproj
     文件         227  2013-07-29 15:01  GGGG.csproj.user
     文件       12684  2013-07-30 16:13  GGInformationForm.Designer.cs
     文件        1841  2013-07-30 16:13  GGInformationForm.cs
............此处省略305个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)