Compare commits

...

13 Commits
main ... lab-6

Author SHA1 Message Date
antoc0der
7ab346f47c просто посмотреть 2024-05-02 23:32:11 +04:00
5faf618870 lab-6 2024-05-02 22:30:08 +04:00
80351d2e2d lab-6 2024-04-24 14:35:39 +04:00
ac1b47b546 lab-5 2024-04-24 14:11:47 +04:00
610b6d4b8c lab-4 finished p.2 2024-04-24 12:38:19 +04:00
c7d5649035 lab-4 finished 2024-04-24 12:37:52 +04:00
3b4f8bba61 lab-3 finished 2024-04-24 12:34:53 +04:00
2db8be3335 lab-3 in process 2024-04-24 12:05:30 +04:00
7d2e133f10 lab-4 2024-04-24 11:23:40 +04:00
69969701cd lab-3 in process 2024-04-24 10:56:11 +04:00
c4ca0272fd lab-3 add forest image 2024-04-04 21:07:26 +04:00
ed503fa8ad lab-2 some minor fixes (image) 2024-04-04 21:02:53 +04:00
869854cf7d lab-2 2024-04-04 20:56:05 +04:00
15 changed files with 123 additions and 36 deletions

View File

@ -7,4 +7,42 @@
<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>
</Resource>
<Resource Include="Resources\images\forest.png">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\images\sea.png">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>
<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>
<Resource Include="Resources\sounds\forest.wav">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\sounds\sea.wav">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>
</ItemGroup>
</Project>

View File

@ -5,35 +5,64 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Interfaces"
mc:Ignorable="d"
Title="Images" Height="450" Width="800">
Title="SoundBox" Height="450" Width="800">
<Window.Resources>
<SolidColorBrush x:Key="ForestBackgroundColor" Color="Olive" />
<SolidColorBrush x:Key="DesertBackgroundColor" Color="LightSalmon" />
<SolidColorBrush x:Key="SeaBackgroundColor" Color="DarkCyan" />
<SolidColorBrush x:Key="ButtonBackgroundColor" Color="Bisque" />
<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border BorderBrush="Maroon" BorderThickness="2"
Background="{StaticResource ButtonBackgroundColor}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Margin" Value="5,5,5,5" />
</Style>
</Window.Resources>
<Grid ShowGridLines="True">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center"
VerticalAlignment="Stretch" Orientation="Vertical">
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image1</Button>
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image2</Button>
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image3</Button>
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image4</Button>
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image5</Button>
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image6</Button>
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image7</Button>
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image8</Button>
</StackPanel>
<DockPanel Grid.Row="0" Grid.Column="1">
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal"
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Border Background="LemonChiffon" BorderThickness="4,4,4,4"
BorderBrush="Goldenrod">
<ScrollViewer CanContentScroll="True" VerticalScrollBarVisibility="Hidden">
<StackPanel Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center"
VerticalAlignment="Stretch" Orientation="Vertical">
<Button Margin="10,5,10,5" Padding="3,3,3,3" Click="ButtonForest_Click">Forest</Button>
<Button Margin="10,5,10,5" Padding="3,3,3,3" Click="ButtonDesert_Click">Desert</Button>
<Button Margin="10,5,10,5" Padding="3,3,3,3" Click="ButtonSea_Click">Sea</Button>
</StackPanel>
</ScrollViewer>
</Border>
<DockPanel Name="PanelMenu" Grid.Row="0" Grid.Column="1"
Background="{StaticResource SeaBackgroundColor}">
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal"
HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Margin="10,5,10,5" Padding="3,3,3,3">Execute</Button>
<Button Margin="10,5,10,5" Padding="3,3,3,3">Cancel</Button>
<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">
<Image Source="C:\Users\user\source\repos\Interfaces_Zakharov_Rostislav\Interfaces\images/image2.png"/>
<DockPanel Background="Black">
<Viewbox>
<!--<Image Name="ImageNature" Source="/Resources/images/forest.png"/>-->
<MediaElement x:Name="vid" Source="/waterfall.mp4" LoadedBehavior="Manual" Visibility="Visible"/>
</Viewbox>
</DockPanel>
</DockPanel>
</DockPanel>
</Grid>
</Grid>
</Window>

View File

@ -1,17 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Interfaces
{
@ -24,5 +14,35 @@ namespace Interfaces
{
InitializeComponent();
}
private void ButtonDesert_Click(object sender, RoutedEventArgs e)
{
//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));
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));
PanelMenu.Background = (Brush)TryFindResource("SeaBackgroundColor");
}
private void ButtonExecute_Click(object sender, RoutedEventArgs e)
{
// justButton.Visibility = Visibility.Visible;
vid.Play();
}
private void ButtonCancel_Click(object sender, RoutedEventArgs e)
{
vid.Stop();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1017 KiB

View File

Before

Width:  |  Height:  |  Size: 880 KiB

After

Width:  |  Height:  |  Size: 880 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.