1
2
3
4
5
6 using System;
7 using System.Windows.API;
8
9 namespace System.Windows
10 {
11 public enum MessageBeepType : uint
12 {
13 MB_ICONASTERISK = 0x00000040u,
14 MB_ICONEXCLAMATION = 0x00000030u,
15 MB_ICONERROR = 0x00000010u,
16 MB_ICONHAND = 0x00000010u,
17 MB_ICONINFORMATION = 0x00000040u,
18 MB_ICONQUESTION = 0x00000020u,
19 MB_ICONSTOP = 0x00000010u,
20 MB_ICONWARNING = 0x00000030u,
21 MB_OK = 0x00000000u,
22 MB_SIMPLE = 0xFFFFFFFFu
23 }
24 public nothrow bool MessageBeep()
25 {
26 return MessageBeep(MessageBeepType.MB_OK);
27 }
28 public nothrow bool MessageBeep(MessageBeepType beepType)
29 {
30 return System.Windows.API.MessageBeep(beepType);
31 }
32 public void MessageBeepChecked()
33 {
34 System.Windows.API.MessageBeepChecked(MessageBeepType.MB_OK);
35 }
36 public void MessageBeepChecked(MessageBeepType beepType)
37 {
38 System.Windows.API.MessageBeepChecked(beepType);
39 }
40 }