728x90
반응형
WPF & C# - SystemSounds.Beep.Play ( 시스템사운드 / Beep / Question / Exclamation / Asterisk / Hand ) |
MainWindow.xaml
1
2
3
4
5
6
7
|
<StackPanel>
<Button x:Name="btnPlayBeep" Click="btnPlayBeep_Click">Beep</Button>
<Button x:Name="btnPlayQuestion" Click="btnPlayQuestion_Click">Question</Button>
<Button x:Name="btnPlayExclamation" Click="btnPlayExclamation_Click">Exclamation0</Button>
<Button x:Name="btnPlayAsterisk" Click="btnPlayAsterisk_Click">Asterisk</Button>
<Button x:Name="btnPlayHand" Click="btnPlayHand_Click">Hand</Button>
</StackPanel>
|
cs |
MainWindow.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
private void btnPlayBeep_Click(object sender, RoutedEventArgs e)
{
SystemSounds.Beep.Play();
}
private void btnPlayQuestion_Click(object sender, RoutedEventArgs e)
{
SystemSounds.Question.Play();
}
private void btnPlayExclamation_Click(object sender, RoutedEventArgs e)
{
SystemSounds.Exclamation.Play();
}
private void btnPlayAsterisk_Click(object sender, RoutedEventArgs e)
{
SystemSounds.Asterisk.Play();
}
private void btnPlayHand_Click(object sender, RoutedEventArgs e)
{
SystemSounds.Hand.Play();
}
|
cs |
728x90
반응형