⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 service1.cs

📁 Listas ordenadas [ordered list]
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;

namespace chatserver
{
    public partial class Service1 : ServiceBase
    {
        public Service1()
        {
            InitializeComponent();
            this.ServiceName = "Chat ip";
            this.EventLog.Source = "Chat ip";
            this.EventLog.Log = "Application";

            this.CanStop = false;
            this.CanPauseAndContinue = true;
        }

        protected override void OnStart(string[] args)
        {
            String hostPort = "";
            Form2 chat = new Form2(hostPort);
            chat.Show();
            
        }

        protected override void OnStop()
        {
            
            String hostPort = "";
            Form2 blockedForm = new Form2(hostPort);
            blockedForm.Show();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -