lab-3 in process

This commit is contained in:
Zakharov_Rostislav 2024-04-24 12:05:30 +04:00
parent 69969701cd
commit 2db8be3335
6 changed files with 26 additions and 19 deletions

View File

@ -8,11 +8,15 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="images\forest.png" /> <Resource Include="images\desert.png">
</ItemGroup> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>
<ItemGroup> <Resource Include="images\desert2.png">
<Resource Include="images\forest.png" /> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>
<Resource Include="images\forest.png">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -19,8 +19,8 @@
<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">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">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">Taiga</Button>
@ -30,14 +30,16 @@
</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="Olive">
<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/desert.png"/>
</Viewbox>
</DockPanel> </DockPanel>
</DockPanel> </DockPanel>
</Grid> </Grid>

View File

@ -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,16 @@ namespace Interfaces
{ {
InitializeComponent(); InitializeComponent();
} }
private void ButtonDesert_Click(object sender, RoutedEventArgs e)
{
ImageNature.Source = new BitmapImage(new Uri("/Resources/images/desert.png", UriKind.Relative));
}
private void ButtonForest_Click(object sender, RoutedEventArgs e)
{
ImageNature.Source = new BitmapImage(new Uri("/Resources/images/forest.png", UriKind.Relative));
}
} }
} }

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.

Before

Width:  |  Height:  |  Size: 165 B