просто посмотреть

This commit is contained in:
antoc0der 2024-05-02 23:32:11 +04:00
parent 5faf618870
commit 7ab346f47c
7 changed files with 27 additions and 9 deletions

View File

@ -7,6 +7,17 @@
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\images\forestvid.mp4">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\images\desert.png">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
@ -20,6 +31,9 @@
<Resource Include="Resources\images\sea2.png">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\images\waterfall.mp4">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\sounds\desert.wav">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>

View File

@ -52,12 +52,15 @@
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"/>
<!--<MediaElement Name="Sound" LoadedBehavior="Play" UnloadedBehavior="Close"
Source="/Resources/sounds/forest.wav"/>-->
</StackPanel>
<DockPanel Background="Black">
<Viewbox>
<Image Name="ImageNature" Source="/Resources/images/forest.png"/>
<!--<Image Name="ImageNature" Source="/Resources/images/forest.png"/>-->
<MediaElement x:Name="vid" Source="/waterfall.mp4" LoadedBehavior="Manual" Visibility="Visible"/>
</Viewbox>
</DockPanel>
</DockPanel>

View File

@ -17,31 +17,32 @@ namespace Interfaces
private void ButtonDesert_Click(object sender, RoutedEventArgs e)
{
ImageNature.Source = new BitmapImage(new Uri("/Resources/images/desert.png", UriKind.Relative));
//ImageNature.Source = new BitmapImage(new Uri("/Resources/images/desert.png", UriKind.Relative));
PanelMenu.Background = (Brush)TryFindResource("DesertBackgroundColor");
}
private void ButtonForest_Click(object sender, RoutedEventArgs e)
{
ImageNature.Source = new BitmapImage(new Uri("/Resources/images/forest.png", UriKind.Relative));
//ImageNature.Source = new BitmapImage(new Uri("/Resources/images/forest.png", UriKind.Relative));
PanelMenu.Background = (Brush)TryFindResource("ForestBackgroundColor");
}
private void ButtonSea_Click(object sender, RoutedEventArgs e)
{
ImageNature.Source = new BitmapImage(new Uri("/Resources/images/sea.png", UriKind.Relative));
//ImageNature.Source = new BitmapImage(new Uri("/Resources/images/sea.png", UriKind.Relative));
PanelMenu.Background = (Brush)TryFindResource("SeaBackgroundColor");
}
private void ButtonExecute_Click(object sender, RoutedEventArgs e)
{
Sound.Play();
// justButton.Visibility = Visibility.Visible;
vid.Play();
}
private void ButtonCancel_Click(object sender, RoutedEventArgs e)
{
Sound.Pause();
vid.Stop();
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.