lab-4 finished
This commit is contained in:
commit
c7d5649035
@ -8,11 +8,18 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="images\forest.png" />
|
<Resource Include="Resources\images\desert.png">
|
||||||
</ItemGroup>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
|
</Resource>
|
||||||
<ItemGroup>
|
<Resource Include="Resources\images\forest.png">
|
||||||
<Resource Include="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>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -6,6 +6,12 @@
|
|||||||
xmlns:local="clr-namespace:Interfaces"
|
xmlns:local="clr-namespace:Interfaces"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="SoundBox" 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" />
|
||||||
|
</Window.Resources>
|
||||||
|
<Grid ShowGridLines="True">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<SolidColorBrush x:Key="ButtonBackgroundColor" Color="Bisque" />
|
<SolidColorBrush x:Key="ButtonBackgroundColor" Color="Bisque" />
|
||||||
<Style TargetType="Button">
|
<Style TargetType="Button">
|
||||||
@ -35,25 +41,23 @@
|
|||||||
<ScrollViewer CanContentScroll="True" VerticalScrollBarVisibility="Hidden">
|
<ScrollViewer CanContentScroll="True" VerticalScrollBarVisibility="Hidden">
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center"
|
<StackPanel Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Stretch" Orientation="Vertical">
|
VerticalAlignment="Stretch" Orientation="Vertical">
|
||||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Forest</Button>
|
<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">Desert</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">Jungle</Button>
|
<Button Margin="10,5,10,5" Padding="3,3,3,3" Click="ButtonSea_Click">Sea</Button>
|
||||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Tundra</Button>
|
|
||||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Taiga</Button>
|
|
||||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Steppe</Button>
|
|
||||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Mountains</Button>
|
|
||||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Sea</Button>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Border>
|
</Border>
|
||||||
<DockPanel Grid.Row="0" Grid.Column="1" Background="Olive">
|
<DockPanel Name="PanelMenu" Grid.Row="0" Grid.Column="1"
|
||||||
|
Background="{StaticResource SeaBackgroundColor}">
|
||||||
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal"
|
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal"
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Center">
|
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">Execute</Button>
|
||||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Cancel</Button>
|
<Button Margin="10,5,10,5" Padding="3,3,3,3">Cancel</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<DockPanel Background="Black">
|
<DockPanel Background="Black">
|
||||||
<Image Source="images/forest.png"/>
|
<Viewbox>
|
||||||
|
<Image Name="ImageNature" Source="/Resources/images/sea.png"/>
|
||||||
|
</Viewbox>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -1,17 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
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;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace Interfaces
|
namespace Interfaces
|
||||||
{
|
{
|
||||||
@ -24,5 +14,24 @@ namespace Interfaces
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
Interfaces/Interfaces/Resources/images/desert.png
Normal file
BIN
Interfaces/Interfaces/Resources/images/desert.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1017 KiB |
Before Width: | Height: | Size: 880 KiB After Width: | Height: | Size: 880 KiB |
BIN
Interfaces/Interfaces/Resources/images/sea.png
Normal file
BIN
Interfaces/Interfaces/Resources/images/sea.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 MiB |
BIN
Interfaces/Interfaces/Resources/images/sea2.png
Normal file
BIN
Interfaces/Interfaces/Resources/images/sea2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
Before Width: | Height: | Size: 165 B |
Loading…
Reference in New Issue
Block a user