lab-3 finished
This commit is contained in:
parent
2db8be3335
commit
3b4f8bba61
@ -8,13 +8,16 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="images\desert.png">
|
<Resource Include="Resources\images\desert.png">
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</Resource>
|
</Resource>
|
||||||
<Resource Include="images\desert2.png">
|
<Resource Include="Resources\images\forest.png">
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</Resource>
|
</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>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</Resource>
|
</Resource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -6,7 +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">
|
||||||
<Grid ShowGridLines="True">
|
<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>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*"></RowDefinition>
|
<RowDefinition Height="*"></RowDefinition>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
@ -21,16 +26,12 @@
|
|||||||
VerticalAlignment="Stretch" Orientation="Vertical">
|
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="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="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 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"
|
<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>
|
||||||
@ -38,7 +39,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<DockPanel Background="Black">
|
<DockPanel Background="Black">
|
||||||
<Viewbox>
|
<Viewbox>
|
||||||
<Image Name="ImageNature" Source="/Resources/images/desert.png"/>
|
<Image Name="ImageNature" Source="/Resources/images/sea.png"/>
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
@ -18,12 +18,20 @@ 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");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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");
|
||||||
|
}
|
||||||
|
|
||||||
|
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