登录
首页 » C# » C# 聊天 ChatClient3源码(仅含服务器端)

C# 聊天 ChatClient3源码(仅含服务器端)

于 2015-04-17 发布
0 166
下载积分: 1 下载次数: 0

代码说明:

C# 聊天 ChatClient3源码(仅含服务器端)

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

发表评论

0 个回复

  • c++ 俄罗斯方块 游戏源码下载
    c++ 俄罗斯方块 游戏源码下载
    2015-04-02下载
    积分:1
  • 人脸识别 http 服务器,以win服务方式后台运行
    【实例简介】 1. 公司做的一个项目,软件跟人脸识别的设备通过tcp接口进行通讯,用户指纹或刷脸成功后,将用户的登录信息以http方式返回给访问的用户。 2. http访问以json格式返回 3. 可以通过post方式设置跟设备通讯的参数 4. 安装完成后以windows服务的方式,后台运行
    2021-07-15 00:31:56下载
    积分: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# 打印报表 例子源码下载
    c# 打印报表 例子源码下载
    2014-12-16下载
    积分:1
  • C# 车牌号码识别 实例源码(于百度OCR)
    使用的百度 车牌照识别,目前是每天免费200次车牌识别
    2019-05-07下载
    积分:1
  • winform 实现鼠标拖放图片, 随鼠标移动的图像实例 附完整源码
    鼠标拖动图片,然后图片随着鼠标移动,放开鼠标后 图片则停留在新位置,如下图效果
    2013-05-07下载
    积分:1
  • 微信回复消息 例子类源码下载
    微信帮助
    2015-01-14下载
    积分:1
  • C# 自定义的AboutBox 示例源码下载
    C# 自定义的AboutBox 示例源码下载
    2013-10-03下载
    积分:1
  • EF Code First简介及一个入门级实例
    一、EF Code First简介 EntityFramework 代码优先   二、EF Code First第一个简单实例 1、开发环境及数据库说明 开发环境:Visual Studio 2010 Ultimate sp1 Sql Server 2008 R2 数据库:Northwind 2、实例代码结构 结构说明: App:控制台应用程序 Data:数据访问 Domain:实体类 3、安装Entity Framework   在Visual Studio编辑器中点击Tools -> Library Package Manager -> Package Manager Console,在Package Manager Console窗口中执行下面语句,安装最新版Entity Framework。 PM> Install-Package EntityFramework   App层和Data层分别添加对EntityFramework的引用:     在App层安装EntityFramework之后,将自动添加App.config和packages.config文件。   App.config配置Entity Framework版本信息及数据库连接信息,修改其中数据连接信息以适应本地实际环境。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15   packages.config现实当前项目使用的package: 1 2 3 4 4、实例代码 Domain中Category.cs 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace Northwind.Domain.Entities 7 { 8 public class Category 9 { 10 /// 11      /// 分类ID 12      /// 13 public int CategoryID { get; set; } 14 15 /// 16      /// 分类名称 17      /// 18 public string CategoryName { get; set; } 19 } 20 } Data中NorthwindContext.cs 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 using System.Data.Entity; 7 8 using Northwind.Domain.Entities; 9 10 namespace Northwind.Data 11 { 12 public class NorthwindContext : DbContext 13 { 14 public DbSet Categories { get; set; } 15 } 16 } App中Program.cs 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 using Northwind.Data; 7 using Northwind.Domain.Entities; 8 9 namespace Northwind.App 10 { 11 class Program 12 { 13 static void Main(string[] args) 14 { 15 Category c = new Category() { CategoryName = "电子数码" }; 16 17 using (NorthwindContext db = new NorthwindContext()) 18 { 19 db.Categories.Add(c); 20 db.SaveChanges(); 21 } 22 23 Console.WriteLine("Finish"); 24 Console.ReadKey(); 25 } 26 } 27 } 5、运行说明   由于在上面的数据库连接字符串中并未包含指定的数据库名称,运行成功之后,将在本地数据引擎中创建如下数据库和表:   数据库名称:Northwind.Data.NorthwindContext   表名称:Categories 6、示例代码附件
    2014-04-22下载
    积分:1
  • 串口运动控制上位机/C#串口助手源码
    C#串口运动控制上位机源码,主要用于运动控制调试,比如在"M "栏输入1000,串口输出M 1000,,在"M-"输入1000,串口输出M-1000;下位机可根据指令进行区别驱动电机方向运动 串口运动控制上位机 └── 马达串口运动控制上位机     ├── SerialCommunicate     │   ├── Form1.Designer.cs     │   ├── Form1.cs     │   ├── Form1.resx     │   ├── Program.cs     │   ├── Properties     │   │   ├── AssemblyInfo.cs     │   │   ├── Resources.Designer.cs     │   │   ├── Resources.resx     │   │   ├── Settings.Designer.cs     │   │   └── Settings.settings     │   ├── SerialCommunicate.csproj     │   ├── bin     │   │   ├── Debug     │   │   │   ├── SerialCommunicate.exe     │   │   │   ├── SerialCommunicate.pdb     │   │   │   ├── SerialCommunicate.vshost.exe     │   │   │   └── SerialCommunicate.vshost.exe.manifest     │   │   └── Release     │   │       ├── SerialCommunicate.exe     │   │       ├── SerialCommunicate.pdb     │   │       ├── SerialCommunicate.vshost.exe     │   │       └── SerialCommunicate.vshost.exe.manifest     │   └── obj     │       ├── Debug     │       │   ├── DesignTimeResolveAssemblyReferences.cache     │       │   ├── DesignTimeResolveAssemblyReferencesInput.cache     │       │   ├── SerialCommunicate.Form1.resources     │       │   ├── SerialCommunicate.Properties.Resources.resources     │       │   ├── SerialCommunicate.csproj.FileListAbsolute.txt     │       │   ├── SerialCommunicate.csproj.GenerateResource.Cache     │       │   ├── SerialCommunicate.csprojResolveAssemblyReference.cache     │       │   ├── SerialCommunicate.exe     │       │   ├── SerialCommunicate.pdb     │       │   └── TempPE     │       └── Release     │           ├── 3ed801191daeeafe4f32720599873cc71f6b.png     │           ├── DesignTimeResolveAssemblyReferences.cache     │           ├── DesignTimeResolveAssemblyReferencesInput.cache     │           ├── QIcon Changer.exe     │           ├── SerialCommunicate.Form1.resources     │           ├── SerialCommunicate.Properties.Resources.resources     │           ├── SerialCommunicate.csproj.FileListAbsolute.txt     │           ├── SerialCommunicate.csproj.GenerateResource.Cache     │           ├── SerialCommunicate.csprojResolveAssemblyReference.cache     │           ├── SerialCommunicate.exe     │           ├── SerialCommunicate.pdb     │           └── TempPE     ├── SerialCommunicate.sln     └── SerialCommunicate.v11.suo 11 directories, 40 files
    2021-08-15 00:31:13下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载