private void btnStartAll_Click(object sender, EventArgs e)
        {
            process_gateway = null;
            process_agent   = null;

            string result = runCMD(@"netstat -ano | findstr "":8181 """);

            if (!string.IsNullOrEmpty(result))
            {
                string pid = getPID(result);
                if (!string.IsNullOrEmpty(pid))
                {
                    runCMD(@"taskkill /PID " + pid + " /F");
                }
            }

            result = runCMD(@"netstat -ano | findstr "":9997 """);
            if (!string.IsNullOrEmpty(result))
            {
                string pid = getPID(result);
                if (!string.IsNullOrEmpty(pid))
                {
                    runCMD(@"taskkill /PID " + pid + " /F");
                }
            }

            btnJAVAStartGateway_Click(this, null);

            worker = new ServiceWorker();

            worker.Start();

            btnJAVAStartAgent_Click(this, null);
        }
 private void btnStartService_Click(object sender, EventArgs e)
 {
     worker = new ServiceWorker();
     worker.Start();
 }