Пример #1
0
        //	为Service发出声音
        public static void SvcBeep(SvcAction action)
        {
            if (!ConfigFile.BeepOnSvcAction)
            {
                return;
            }
            switch (action)
            {
            case SvcAction.Starting:
                Win32API.Beep(4000, 200);
                break;     //	Service开始启动

            case SvcAction.Started:
                Win32API.Beep(1000, 400);
                Win32API.Beep(4000, 400);
                break;     //	Service启动完毕

            case SvcAction.Stopping:
                Win32API.Beep(1000, 200);
                break;     //	Service开始停止

            case SvcAction.Stopped:
                Win32API.Beep(4000, 200);
                break;     //	Service停止完毕
            }
        }
Пример #2
0
 //	为Service发出声音
 public static void SvcBeep(SvcAction action)
 {
     //if (!ConfigFile.BeepOnSvcAction)
     //    return;
     //switch (action)
     //{
     //    case SvcAction.Starting:
     //        Win32API.Beep(4000, 200);
     //        break; //	Service开始启动
     //    case SvcAction.Started:
     //        Win32API.Beep(1000, 400);
     //        Win32API.Beep(4000, 400);
     //        break; //	Service启动完毕
     //    case SvcAction.Stopping:
     //        Win32API.Beep(1000, 200);
     //        break; //	Service开始停止
     //    case SvcAction.Stopped:
     //        Win32API.Beep(4000, 200);
     //        break; //	Service停止完毕
     //}
 }