lab-6
This commit is contained in:
parent
80351d2e2d
commit
5faf618870
@ -20,9 +20,15 @@
|
||||
<Resource Include="Resources\images\sea2.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Resources\sounds\desert.wav">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Resources\sounds\forest.wav">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Resources\sounds\sea.wav">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -6,30 +6,6 @@
|
||||
xmlns:local="clr-namespace:Interfaces"
|
||||
mc:Ignorable="d"
|
||||
Title="SoundBox" Height="450" Width="800">
|
||||
<Window.Triggers>
|
||||
<EventTrigger RoutedEvent="Loaded">
|
||||
<EventTrigger.Actions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetProperty="Width" TargetName="ButtonExecute">
|
||||
<DoubleAnimation From="110"
|
||||
To="200"
|
||||
Duration="0:0:2"
|
||||
AutoReverse="True"
|
||||
RepeatBehavior="Forever"/>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetProperty="Width" TargetName="ButtonCancel">
|
||||
<DoubleAnimation From="200"
|
||||
To="110"
|
||||
Duration="0:0:2"
|
||||
AutoReverse="True"
|
||||
RepeatBehavior="Forever"/>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger.Actions>
|
||||
</EventTrigger>
|
||||
</Window.Triggers>
|
||||
<Window.Resources>
|
||||
<SolidColorBrush x:Key="ForestBackgroundColor" Color="Olive" />
|
||||
<SolidColorBrush x:Key="DesertBackgroundColor" Color="LightSalmon" />
|
||||
@ -72,14 +48,16 @@
|
||||
Background="{StaticResource SeaBackgroundColor}">
|
||||
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Button Name="ButtonExecute" Margin="10,5,10,5" Padding="3,3,3,3" Click="ButtonExecute_Click">Execute</Button>
|
||||
<Button Name="ButtonCancel" Margin="10,5,10,5" Padding="3,3,3,3" Click="ButtonCancel_Click">Cancel</Button>
|
||||
<MediaElement Name="Sound" LoadedBehavior="Manual" UnloadedBehavior="Close"
|
||||
<Button Name="ButtonExecute" Margin="10,5,10,5" Padding="3,3,3,3"
|
||||
Click="ButtonExecute_Click">Execute</Button>
|
||||
<Button Name="ButtonCancel" Margin="10,5,10,5" Padding="3,3,3,3"
|
||||
Click="ButtonCancel_Click">Cancel</Button>
|
||||
<MediaElement Name="Sound" LoadedBehavior="Play" UnloadedBehavior="Close"
|
||||
Source="/Resources/sounds/forest.wav"/>
|
||||
</StackPanel>
|
||||
<DockPanel Background="Black">
|
||||
<Viewbox>
|
||||
<Image Name="ImageNature" Source="/Resources/images/sea2.png"/>
|
||||
<Image Name="ImageNature" Source="/Resources/images/forest.png"/>
|
||||
</Viewbox>
|
||||
</DockPanel>
|
||||
</DockPanel>
|
||||
|
@ -30,7 +30,7 @@ namespace Interfaces
|
||||
|
||||
private void ButtonSea_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ImageNature.Source = new BitmapImage(new Uri("/Resources/images/sea2.png", UriKind.Relative));
|
||||
ImageNature.Source = new BitmapImage(new Uri("/Resources/images/sea.png", UriKind.Relative));
|
||||
PanelMenu.Background = (Brush)TryFindResource("SeaBackgroundColor");
|
||||
}
|
||||
|
||||
|
BIN
Interfaces/Interfaces/Resources/sounds/desert.wav
Normal file
BIN
Interfaces/Interfaces/Resources/sounds/desert.wav
Normal file
Binary file not shown.
BIN
Interfaces/Interfaces/Resources/sounds/sea.wav
Normal file
BIN
Interfaces/Interfaces/Resources/sounds/sea.wav
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user