Cgw.Common.MonitorServiceControl.MonitorServiceRun C# (CSharp) Method

MonitorServiceRun() public method

public MonitorServiceRun ( ) : bool
return bool
        public bool MonitorServiceRun()
        {
            ServiceController cs = new ServiceController();
            cs.ServiceName = "HUAWEI SMC 2.0 MonitorManage";
            cs.Refresh();

            if (cs.Status == ServiceControllerStatus.Running || cs.Status == ServiceControllerStatus.StartPending)
            {
                return true;
            }
            return false;
        }