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

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

View File

@ -52,12 +52,15 @@
Click="ButtonExecute_Click">Execute</Button> Click="ButtonExecute_Click">Execute</Button>
<Button Name="ButtonCancel" Margin="10,5,10,5" Padding="3,3,3,3" <Button Name="ButtonCancel" Margin="10,5,10,5" Padding="3,3,3,3"
Click="ButtonCancel_Click">Cancel</Button> Click="ButtonCancel_Click">Cancel</Button>
<MediaElement Name="Sound" LoadedBehavior="Play" UnloadedBehavior="Close" <!--<MediaElement Name="Sound" LoadedBehavior="Play" UnloadedBehavior="Close"
Source="/Resources/sounds/forest.wav"/> Source="/Resources/sounds/forest.wav"/>-->
</StackPanel> </StackPanel>
<DockPanel Background="Black"> <DockPanel Background="Black">
<Viewbox> <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> </Viewbox>
</DockPanel> </DockPanel>
</DockPanel> </DockPanel>

View File

@ -17,31 +17,32 @@ namespace Interfaces
private void ButtonDesert_Click(object sender, RoutedEventArgs e) 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"); PanelMenu.Background = (Brush)TryFindResource("DesertBackgroundColor");
} }
private void ButtonForest_Click(object sender, RoutedEventArgs e) 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"); PanelMenu.Background = (Brush)TryFindResource("ForestBackgroundColor");
} }
private void ButtonSea_Click(object sender, RoutedEventArgs e) 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"); PanelMenu.Background = (Brush)TryFindResource("SeaBackgroundColor");
} }
private void ButtonExecute_Click(object sender, RoutedEventArgs e) private void ButtonExecute_Click(object sender, RoutedEventArgs e)
{ {
Sound.Play(); // justButton.Visibility = Visibility.Visible;
vid.Play();
} }
private void ButtonCancel_Click(object sender, RoutedEventArgs e) 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.