private void StopServices() { if (_services != null) { _services.Stop(); _services = null; } EnableStart(true); }
private void OnListen() { try { _services = new SCWebServices(); _services.Port = (int)nupLisPort.Value; _services.Start(); EnableStart(false); RefreashWeb(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "启动失败", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// 刷新监听的Web /// </summary> private void RefreashWeb() { List <LanMachine> lstMachine = GetAllMachine(gvLis); SCWebServices.WriteWakeUp(lstMachine); }