Exemple #1
0
        void FormMain_FormClosed(object sender, FormClosedEventArgs e)
        {
            //关闭Http服务器
            NdaHttpServer.StopServer();

            Process.GetCurrentProcess().Kill();
            System.Environment.Exit(0);
        }
Exemple #2
0
        private void StartHttpServer()
        {
            string ip   = SysConfig.ServerIP;
            int    port = SysConfig.ServerPort;

            if (ip != null && ip.Length > 0)
            {
                NdaHttpServer.StartServer(ip, port);
            }
        }
Exemple #3
0
        private void timerServer_Tick(object sender, EventArgs e)
        {
            bool succeed = NdaHttpServer.TestServer();

            this.toolStripStatusLabelServerStatus.Text = "服务接口状态(" + SysConfig.ServerIP + ":" + SysConfig.ServerPort.ToString() + "): " + (succeed ? "正常" : "无服务");
        }