Skip to content

Commit

Permalink
added audio to resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Justa authored and Justa committed Feb 21, 2023
1 parent 8dfc099 commit dca1a62
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 7 deletions.
1 change: 0 additions & 1 deletion youareanidiot/Form1.Designer.cs

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

14 changes: 10 additions & 4 deletions youareanidiot/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,16 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing">
<value>17, 17</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="$this.Locked" type="System.Boolean, mscorlib">
<value>True</value>
</metadata>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="you_are_an_idiot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>bin\Debug\you-are-an-idiot.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
4 changes: 2 additions & 2 deletions youareanidiot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ static void Main()
}
public static void playaudio()
{
Stream ae = System.IO.File.OpenRead("you-are-an-idiot.wav");
player = new SoundPlayer(ae);

player = new SoundPlayer(youareanidiot.Properties.Resources.you_are_an_idiot);

player.PlayLooping();
}
Expand Down
9 changes: 9 additions & 0 deletions youareanidiot/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 youareanidiot/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,7 @@
<data name="you-are-idiot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\you-are-idiot.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="you_are_an_idiot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\you-are-an-idiot.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
Binary file added youareanidiot/Resources/you-are-an-idiot.wav
Binary file not shown.
8 changes: 8 additions & 0 deletions youareanidiot/youareanidiot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Form11.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
Expand Down Expand Up @@ -83,5 +85,11 @@
<ItemGroup>
<None Include="Resources\you-are-idiot.gif" />
</ItemGroup>
<ItemGroup>
<None Include="bin\Debug\you-are-an-idiot.wav" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\you-are-an-idiot.wav" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

0 comments on commit dca1a62

Please sign in to comment.