登录
首页 » C# » WPF IM聊天实例源码下载

WPF IM聊天实例源码下载

于 2015-05-01 发布
0 236
下载积分: 1 下载次数: 0

代码说明:

不错的wpf IM聊天程序,实现了基本的聊天功能 注意事项: 1.在自己的机器配置的话,客户端需要更改 config目录下的 IPAddress.xml文件,将其中的ip 改成自己本机ip(本机ip可通过 cmd ipconfig命令查看) 2. server端 则需要将 server/data/目录下的chatdata.mdf这个数据库附加下,同时修改程序中对应的数据库连接串(在DataLink.cs中),例如 我就修改成了这个 private static string Link = @"Data Source = localhost;Initial Catalog = ChatData;User Id = sa;Password = xxxx;";  大家根据自己的情况修改即可    客户端登陆账号:10007 密码:123456

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • WINFORM C# Picture控件透明背景的实例(可以拖动)
    WINFORM C# Picture控件透明背景的实例(可以拖动)
    2014-12-25下载
    积分:1
  • C# 制作系统服务 实例源码下载
    附件中有详细的安装使用文档,大概步骤如下:1.新建Windows项目,选择"Windows服务"类型的工程。2.生成的Program.cs文件中,定义了服务启动的Main函数。 代码 namespace WindowsService1{    static class Program    {        ///         /// 应用程序的主入口点。        ///         static void Main()        {            ServiceBase[] ServicesToRun;            ServicesToRun = new ServiceBase[]             {                 new Service1()             };            ServiceBase.Run(ServicesToRun);        }    }}  3.在新建的工程中,点击Service1.cs文件,切换到代码视图,生成的代码继承于ServiceBase基类,并重载了OnStart和OnStop方法。我在这个文件中进行了一些简单的操作,就是在服务开始的时候,定义一个定时器,然后每隔1秒钟,向文件中写入当前时间。 代码 namespace WindowsService1{    public partial class Service1 : ServiceBase    {        Timer timer;        public Service1()        {            InitializeComponent();        }        protected override void OnStart(string[] args)        {            timer = new Timer(1000);            timer.Elapsed  = new ElapsedEventHandler(timer_Elapsed);            timer.Start();        }        protected override void OnStop()        {            timer.Stop();            timer.Dispose();        }        void timer_Elapsed(object sender, ElapsedEventArgs e)        {            string filePath = AppDomain.CurrentDomain.BaseDirectory   "test.txt";            StreamWriter sw = null;            if (!File.Exists(filePath))            {                sw = File.CreateText(filePath);            }            else            {                sw = File.AppendText(filePath);            }            sw.Write("访问时间:" DateTime.Now.ToString() Environment.NewLine);            sw.Close();        }    }}4.向工程中添加一个安装程序类。 4.在新添加的安装程序类中,设定服务的名称,启动方式,账号名和密码等信息。 代码 namespace WindowsService1{    partial class Installer1    {        ///         /// 必需的设计器变量。        ///         private System.ComponentModel.IContainer components = null;        private System.ServiceProcess.ServiceProcessInstaller spInstaller;        private System.ServiceProcess.ServiceInstaller sInstaller;        ///          /// 清理所有正在使用的资源。        ///         /// 如果应释放托管资源,为 true;否则为 false。        protected override void Dispose(bool disposing)        {            if (disposing && (components != null))            {                components.Dispose();            }            base.Dispose(disposing);        }        #region 组件设计器生成的代码        ///         /// 设计器支持所需的方法 - 不要        /// 使用代码编辑器修改此方法的内容。        ///         private void InitializeComponent()        {            components = new System.ComponentModel.Container();            // 创建ServiceProcessInstaller对象和ServiceInstaller对象            this.spInstaller =new System.ServiceProcess.ServiceProcessInstaller();            this.sInstaller = new System.ServiceProcess.ServiceInstaller();            // 设定ServiceProcessInstaller对象的帐号、用户名和密码等信息            this.spInstaller.Account = System.ServiceProcess.ServiceAccount.LocalSystem;            this.spInstaller.Password = null;            this.spInstaller.Username = null;            // 设定服务的名称            this.sInstaller.ServiceName = "WindowsService1";            //设定服务启动的方式            this.sInstaller.StartType = System.ServiceProcess.ServiceStartMode.Automatic;            this.Installers.AddRange(new System.Configuration.Install.Installer[] {            this.spInstaller,this.sInstaller});        }        #endregion    }}5.生成工程,在bin目录下会生成exe文件。如果直接运行exe文件的话,是不能执行的,需要使用安装Windows服务用到一个名为InstallUtil.exe的命令行工具,打开命令行工具,转到InstallUtil.exe的目录下,我安装的是VS 2010,对应的目录为:C:WindowsMicrosoft.NETFrameworkv4.0.30319InstallUtil.exe,然后执行InstallUtil.exe 待执行的exe文件的目录,如:InstallUtil.exe F:MyProjectWindowsService1WindowsService1inDebugWindowsService1.exe。执行成功后,会在Windows的服务中,出现了刚刚添加的服务的名称。 6.启动该服务,这时打开binDebug文件夹,发现已经生成了一个test.txt的文件,里面记录了时间。这说明服务已经正式开始执行。7.停止服务的操作也和简单,打开命令行工具,转到C:WindowsMicrosoft.NETFrameworkv4.0.30319目录,然后执行InstallUtil.exe - u F:MyProjectWindowsService1WindowsService1inDebugWindowsService1.exe命令就可以了。
    2015-04-21下载
    积分:1
  • C++ 可导出的动态链接库函数(提高篇-实例185).zip
    C++ 可导出的动态链接库函数(提高篇-实例185).zip
    2019-10-02下载
    积分:1
  • C# 磁性窗体的设计示例
    C# 磁性窗体的设计示例
    2015-01-08下载
    积分:1
  • 于TCP的网络通信入门级示例
    基于TCP的网络通信
    2018-05-28下载
    积分:1
  • STM32单片机实现音控制
    实验器材: 战舰STM32F103开发板V3版本 实验目的: 学习串口的使用(接收与发送) 硬件资源: 1,DS0(连接在PB5)   2,串口1(波特率:115200,PA9/PA10连接在板载USB转串口芯片CH340上面) 实验现象: 本实验,STM32通过串口1和上位机对话,STM32在收到上位机发过来的字符串(以回车换 行结束)后, 原原本本的返回给上位机。下载后,DS0闪烁,提示程序在运行,同时每 隔一定时间,通过串口1输出一段信息到电脑。  注意事项: 1,电脑端串口调试助手波特率必须是115200. 2,请使用XCOM/SSCOM串口调试助手,其他串口助手可能控制DTR/RTS导致MCU复位/程序不运行 3,串口输入字符串以回车换行结束. 4,请用USB线连接在USB_232,找到USB转串口后测试本例程. 5,P4的PA9/PA10必须通过跳线帽连接在RXD/TXD上.
    2020-03-09下载
    积分:1
  • 在网页创建 百度地图示例代码
    在网页创建 百度地图示例代码
    2015-01-11下载
    积分:1
  • C# 三层架构示例项目源码(CodematicDemoF3)
    CodematicDemoF3  CodematicDemoF3 是一个基于工厂模式的三层架构示例项目源码,基于VS2005 SP1开发(如果没有装SP1,web项目会打不开),结构更简洁,提供更多有效的示例源码参考。方便用户更好的理解和使用该架构进行开发,配合动软Codematic代码生成器,可以使开发效率事半功倍,倍感轻松。 登录用户:admin  密码:1 ******************************************************项目结构:Lib:公用类库BLL: 业务层DALFactory: 工厂类IDAL: 接口层Model: 数据实体SQLServerDAL: 数据层Web: 表示层,Web项目 Codematic_Data.MDF : 该项目所使用的数据库DEncryptTest :加密解密工具 具体介绍请看 Codematic代码自动生成器 的帮助文档。
    2017-03-27下载
    积分:1
  • .NET Reflector 5.0 使用例子(反编译软件)
    .NET Reflector 5.0 Release Notes 28 December 2006 Reflector is a class browser for .NET components. It allows browsing and searching the meta data, IL instructions, resources and XML documentation stored in a .NET assembly. Reflector was first released in October 2000 running on .NET Framework 1.0 Beta. LINQ and .NET Framework 3.5: Reflector supports query expressions and other concepts introduced in C# 3.5. To enable this feature select ".NET 3.5" under View, Options, Disassembler, Optimization. .NET Framework compatibility: Reflector runs on all versions of the .NET Framework using its own assembly loading infrastructure which does not rely on the Reflection API. For example, Reflector can load .NET Framework 2.0 assemblies without having the .NET Framework 2.0 installed. Assembly Lists: When launched for the first time, Reflector allows you to choose a default set of assemblies. The list of assemblies is then stored in the Reflector.cfg file and will be loaded next time you open the program. Reflector allows creating multiple assembly lists and switching between the lists using the File, Open List dialog. To choose a different set of default assemblies for the current assembly list you should remove all assemblies from the list (DEL) and invoke the Refresh command (F5). Assembly Cache: When resolving an assembly reference, Reflector will first search the local path next to the assembly holding the reference and then falls back to the cache directories defined in the Reflector.cfg file. Reflector does not search the Global Assembly Cache (GAC) unless you add "%SystemRoot%Assembly" to the cache directories list. Assembly Versioning: By default, assembly version numbers are ignored when resolving type and member references. You can enable side-by-side versioning in the options dialog but it is suggested to avoid this if possible. Add-Ins: Information about the Reflector add-in model can be found here. The most recent version of .NET Reflector is available here. Disclaimer: This software is provided "AS IS" with no warranties of any kind. The entire risk arising out of the use or performance of the software is with you.
    2015-06-15下载
    积分:1
  • C#班级管理系统源码(含数据库)
    C#班级管理系统源码(含数据库)
    2020-05-06下载
    积分:1
  • 696516资源总数
  • 106409会员总数
  • 8今日下载