示例#1
0
        public bool StopInterface(GCInterface gcInterface)
        {
            if (!ValidateInterface(gcInterface))
            {
                return(false);
            }
            //return TempFunctionHandler("Stop interface's NT service.");

            bool res = ExecuteCommand(gcInterface, CommandType.Stop, true);

            if (gcInterface.Directory.Header.UseCommandOnly)
            {
                return(res);
            }
            else
            {
                res = ExecuteFile(gcInterface, DeviceFileType.StopScript, true);
            }

            if (!res)
            {
                return(res);
            }
            return(ServiceControl.SetServiceStartStyle(gcInterface.InterfaceName, ServiceControl.Manual));
        }