lab-3 finished
This commit is contained in:
parent
2db8be3335
commit
3b4f8bba61
@ -8,13 +8,16 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="images\desert.png">
|
||||
<Resource Include="Resources\images\desert.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="images\desert2.png">
|
||||
<Resource Include="Resources\images\forest.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="images\forest.png">
|
||||
<Resource Include="Resources\images\sea.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Resources\images\sea2.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
|
@ -6,6 +6,11 @@
|
||||
xmlns:local="clr-namespace:Interfaces"
|
||||
mc:Ignorable="d"
|
||||
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">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
@ -21,16 +26,12 @@
|
||||
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">Jungle</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>
|
||||
<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="Olive">
|
||||
<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>
|
||||
@ -38,7 +39,7 @@
|
||||
</StackPanel>
|
||||
<DockPanel Background="Black">
|
||||
<Viewbox>
|
||||
<Image Name="ImageNature" Source="/Resources/images/desert.png"/>
|
||||
<Image Name="ImageNature" Source="/Resources/images/sea.png"/>
|
||||
</Viewbox>
|
||||
</DockPanel>
|
||||
</DockPanel>
|
||||
|
@ -18,12 +18,20 @@ namespace Interfaces
|
||||
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/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 |
Loading…
Reference in New Issue
Block a user