mscorlib(4.0.0.0) API with additions
SystemSounds.cs
2 
3 namespace System.Media
4 {
6  [HostProtection(SecurityAction.LinkDemand, UI = true)]
7  public sealed class SystemSounds
8  {
9  private class NativeMethods
10  {
11  internal const int MB_ICONHAND = 16;
12 
13  internal const int MB_ICONQUESTION = 32;
14 
15  internal const int MB_ICONEXCLAMATION = 48;
16 
17  internal const int MB_ICONASTERISK = 64;
18 
19  private NativeMethods()
20  {
21  }
22  }
23 
24  private static volatile SystemSound asterisk;
25 
26  private static volatile SystemSound beep;
27 
28  private static volatile SystemSound exclamation;
29 
30  private static volatile SystemSound hand;
31 
32  private static volatile SystemSound question;
33 
36  public static SystemSound Asterisk
37  {
38  get
39  {
40  if (asterisk == null)
41  {
42  asterisk = new SystemSound(64);
43  }
44  return asterisk;
45  }
46  }
47 
50  public static SystemSound Beep
51  {
52  get
53  {
54  if (beep == null)
55  {
56  beep = new SystemSound(0);
57  }
58  return beep;
59  }
60  }
61 
64  public static SystemSound Exclamation
65  {
66  get
67  {
68  if (exclamation == null)
69  {
70  exclamation = new SystemSound(48);
71  }
72  return exclamation;
73  }
74  }
75 
78  public static SystemSound Hand
79  {
80  get
81  {
82  if (hand == null)
83  {
84  hand = new SystemSound(16);
85  }
86  return hand;
87  }
88  }
89 
92  public static SystemSound Question
93  {
94  get
95  {
96  if (question == null)
97  {
98  question = new SystemSound(32);
99  }
100  return question;
101  }
102  }
103 
104  private SystemSounds()
105  {
106  }
107  }
108 }
static SystemSound Hand
Gets the sound associated with the Hand program event in the current Windows sound scheme.
Definition: SystemSounds.cs:79
static SystemSound Asterisk
Gets the sound associated with the Asterisk program event in the current Windows sound scheme.
Definition: SystemSounds.cs:37
Definition: __Canon.cs:3
static SystemSound Beep
Gets the sound associated with the Beep program event in the current Windows sound scheme.
Definition: SystemSounds.cs:51
Retrieves sounds associated with a set of Windows operating system sound-event types....
Definition: SystemSounds.cs:7
static SystemSound Exclamation
Gets the sound associated with the Exclamation program event in the current Windows sound scheme.
Definition: SystemSounds.cs:65
Represents a system sound type.
Definition: SystemSound.cs:10
SecurityAction
Specifies the security actions that can be performed using declarative security.
static SystemSound Question
Gets the sound associated with the Question program event in the current Windows sound scheme.
Definition: SystemSounds.cs:93