Skip to content

Commit

Permalink
play sound on profile application
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkirie committed Jun 22, 2021
1 parent c115aee commit b4bf63c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DockerForm/CPU.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ public void SetPowerProfile(PowerProfile profile)
// update current profile
MainForm.CurrentProfile = profile;
MainForm.SendNotification($"Power Profile [{profile.GetName()}] applied.", true, true);

// play sound
System.Media.SoundPlayer player = new System.Media.SoundPlayer(Properties.Resources.Sample_0006);
player.Play();
}
}
}
9 changes: 9 additions & 0 deletions DockerForm/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions DockerForm/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,7 @@
<data name="logo_microsoft" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\1200px-Microsoft_Store_logo.svg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Sample_0006" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Sample_0006.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
Binary file added DockerForm/Resources/Sample_0006.wav
Binary file not shown.

0 comments on commit b4bf63c

Please sign in to comment.