5 Commits

Author SHA1 Message Date
IlyasValiulov
db3cd55efd + Лабараторная 5 и 6 2024-10-08 18:12:49 +04:00
IlyasValiulov
cc7f8416bc Лабораторная работа 4 2024-10-04 15:26:50 +04:00
IlyasValiulov
b3f98cc173 Лабарторная 4 Измененная 2024-10-04 14:33:22 +04:00
IlyasValiulov
2ff58a9910 Лабораторная работа 4 2024-10-03 23:05:48 +04:00
IlyasValiulov
c50e2dead7 Лабораторная 3 2024-10-03 21:21:24 +04:00
5 changed files with 114 additions and 7 deletions

View File

@@ -7,7 +7,27 @@
mc:Ignorable="d"
Title="MainWindow" Height="500" Width="800" MinHeight="450" MinWidth="600" Background="LightYellow">
<Grid ShowGridLines="True">
<Window.Resources>
<SolidColorBrush x:Key="BrushBlack" Color="Black"/>
<SolidColorBrush x:Key="BrushWheat" Color="Wheat"/>
<Style x:Key="buttonDesicion" TargetType="Button">
<Setter Property="FontSize" Value="18"/>
<Setter Property="Margin" Value="20"/>
</Style>
<Style x:Key="checkboxStyle" TargetType="CheckBox">
<Setter Property="FontSize" Value="14"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="Green"/>
<Setter Property="FontWeight" Value="Bold"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid ShowGridLines="True" Margin="0,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="2*"></RowDefinition>
@@ -22,12 +42,81 @@
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Vertical">
<CheckBox FontSize="16" Margin="10" Content=" Я согласен с пользовательским соглашением"/>
<CheckBox FontSize="16" Margin="10" Content="Я согласен на обработку данных"/>
<CheckBox Style="{StaticResource checkboxStyle}" Margin="10" Content=" Я согласен с пользовательским соглашением"/>
<CheckBox Style="{StaticResource checkboxStyle}" Margin="10" Content="Я согласен на обработку данных"/>
</StackPanel>
<Button MinHeight="50" MinWidth="50" FontSize="18" Margin="20" Grid.Row="3" Grid.Column="1">Принять</Button>
<Button MinHeight="50" MinWidth="50" FontSize="18" Margin="20" Grid.Row="3" Grid.Column="2">Отмена</Button>
<Button x:Name="shakingbutton" Style="{StaticResource buttonDesicion}" Background="{StaticResource BrushWheat}" MinHeight="50" MinWidth="50" Grid.Row="3" Grid.Column="1" Content="Установить">
<Button.RenderTransform>
<TranslateTransform/>
</Button.RenderTransform>
<Button.Triggers>
<EventTrigger RoutedEvent="MouseEnter">
<BeginStoryboard Name="MouseEnter_BeginStoryboard">
<Storyboard>
<DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetProperty="RenderTransform.(TranslateTransform.Y)">
<SplineDoubleKeyFrame KeyTime="0:0:0" Value="0" />
<SplineDoubleKeyFrame KeyTime="0:0:0.50" Value="-5" />
<SplineDoubleKeyFrame KeyTime="0:0:1" Value="0" />
<SplineDoubleKeyFrame KeyTime="0:0:1.50" Value="5" />
<SplineDoubleKeyFrame KeyTime="0:0:2" Value="0" />
</DoubleAnimationUsingKeyFrames>
<ColorAnimation Storyboard.TargetName="shakingbutton"
Storyboard.TargetProperty="(Button.Foreground).(SolidColorBrush.Color)"
To="Green"
Duration="0:0:0.1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseLeave">
<StopStoryboard BeginStoryboardName="MouseEnter_BeginStoryboard"/>
</EventTrigger>
</Button.Triggers>
</Button>
<Button x:Name="cancelbutton" Background="{StaticResource BrushWheat}" MinHeight="50" MinWidth="50" Grid.Row="3" Grid.Column="2" Content="Отмена" FontSize="18" Margin="20">
<Button.RenderTransform>
<TranslateTransform/>
</Button.RenderTransform>
<Button.Triggers>
<EventTrigger RoutedEvent="MouseEnter">
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetProperty="RenderTransform.(TranslateTransform.Y)">
<SplineDoubleKeyFrame KeyTime="0:0:0" Value="0" />
<SplineDoubleKeyFrame KeyTime="0:0:0.50" Value="-5" />
<SplineDoubleKeyFrame KeyTime="0:0:1" Value="0" />
<SplineDoubleKeyFrame KeyTime="0:0:1.50" Value="5" />
<SplineDoubleKeyFrame KeyTime="0:0:2" Value="0" />
</DoubleAnimationUsingKeyFrames>
<ColorAnimation Storyboard.TargetName="shakingbutton"
Storyboard.TargetProperty="(Button.Foreground).(SolidColorBrush.Color)"
To="Green"
Duration="0:0:0.1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseLeave">
<StopStoryboard BeginStoryboardName="MouseEnter_BeginStoryboard"/>
</EventTrigger>
</Button.Triggers>
<Button.Style>
<Style>
<Style.Triggers>
<EventTrigger RoutedEvent="Button.Click">
<EventTrigger.Actions>
<SoundPlayerAction Source="sounds/button_cancel.wav"></SoundPlayerAction>
</EventTrigger.Actions>
</EventTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Label Content="Установка" Grid.Row="0" Grid.Column="0" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
@@ -37,12 +126,14 @@
<Run>Путь установки: C:\Users\Ilyas\AppData\Local\hgv</Run>
</Paragraph>
<Paragraph>
<Run>Требуемого места: 148Т </Run>
<Run>Требуемого места: 148Т</Run>
</Paragraph>
</FlowDocument>
</RichTextBox>
<Image Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Source="images/hgvstrgtavc.png" Stretch="Fill" Margin="0,10"/>
<MediaElement Source="videos/pixel_loading_bar.mp4" LoadedBehavior="Play" Grid.Row="3" Grid.Column="0" Margin="14,10,265,10" Grid.ColumnSpan="2"/>
</Grid>
</Window>

View File

@@ -1,4 +1,5 @@
using System.Text;
using System.Media;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
@@ -20,5 +21,9 @@ namespace WPF
{
InitializeComponent();
}
private void LoginShowBox(object parameter)
{
MessageBox.Show("Вход");
}
}
}

View File

@@ -10,12 +10,23 @@
<ItemGroup>
<None Remove="images\hgvstrgtavc.png" />
<None Remove="sounds\button_cancel.wav" />
<None Remove="videos\pixel_loading_bar.mp4" />
</ItemGroup>
<ItemGroup>
<Resource Include="images\hgvstrgtavc.png">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>
<Content Include="videos\pixel_loading_bar.mp4">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="sounds\button_cancel.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

Binary file not shown.

Binary file not shown.