You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
356 lines
15 KiB
356 lines
15 KiB
<UserControl x:Class="PenaltyMaster3000.View.MainView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:PenaltyMaster3000.View"
|
|
mc:Ignorable="d"
|
|
Height="Auto" Width="Auto">
|
|
<Grid>
|
|
<Grid.Background>
|
|
<ImageBrush ImageSource="/Images/goal_background.jpg"
|
|
Stretch="UniformToFill"/>
|
|
</Grid.Background>
|
|
|
|
<Grid Margin="110,101,128,59">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Image Source="/Images/goalkeeper_top_right.png"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="0"
|
|
Visibility="{Binding VsMgr.GoalTopRightVisibility}"/>
|
|
<Image Source="/Images/football_ball.png"
|
|
Width="50"
|
|
Height="50"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="0"
|
|
Visibility="{Binding VsMgr.BallTopRightVisibility}"/>
|
|
<Image Source="/Images/white_question_point.png"
|
|
Width="40"
|
|
Height="40"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="0"
|
|
Visibility="{Binding VsMgr.QuestionPointTopRightVisibility}"/>
|
|
|
|
<Image Source="/Images/goalkeeper_top_middle.png"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="1"
|
|
Visibility="{Binding VsMgr.GoalTopMiddleVisibility}"/>
|
|
<Image Source="/Images/football_ball.png"
|
|
Width="50"
|
|
Height="50"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="1"
|
|
Visibility="{Binding VsMgr.BallTopMiddleVisibility}"/>
|
|
<Image Source="/Images/white_question_point.png"
|
|
Width="40"
|
|
Height="40"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="1"
|
|
Visibility="{Binding VsMgr.QuestionPointTopMiddleVisibility}"/>
|
|
|
|
<Image Source="/Images/goalkeeper_top_left.png"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="2"
|
|
Visibility="{Binding VsMgr.GoalTopLeftVisibility}"/>
|
|
<Image Source="/Images/football_ball.png"
|
|
Width="50"
|
|
Height="50"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="2"
|
|
Visibility="{Binding VsMgr.BallTopLeftVisibility}"/>
|
|
<Image Source="/Images/white_question_point.png"
|
|
Width="40"
|
|
Height="40"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="2"
|
|
Visibility="{Binding VsMgr.QuestionPointTopLeftVisibility}"/>
|
|
|
|
|
|
<Image Source="/Images/goalkeeper_down_right.png"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="0"
|
|
Visibility="{Binding VsMgr.GoalDownRightVisibility}"/>
|
|
<Image Source="/Images/football_ball.png"
|
|
Width="50"
|
|
Height="50"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="0"
|
|
Visibility="{Binding VsMgr.BallDownRightVisibility}"/>
|
|
<Image Source="/Images/white_question_point.png"
|
|
Width="40"
|
|
Height="40"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="0"
|
|
Visibility="{Binding VsMgr.QuestionPointDownRightVisibility}"/>
|
|
|
|
<Image Source="{Binding CurrentImageSource}"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="1"
|
|
Visibility="{Binding VsMgr.StarterGoal}"/>
|
|
<Image Source="/Images/goalkeeper_down_middle.png"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="1"
|
|
Visibility="{Binding VsMgr.GoalDownMiddleVisibility}"/>
|
|
<Image Source="/Images/football_ball.png"
|
|
Width="50"
|
|
Height="50"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="1"
|
|
Visibility="{Binding VsMgr.BallDownMiddleVisibility}"/>
|
|
<Image Source="/Images/white_question_point.png"
|
|
Width="40"
|
|
Height="40"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="1"
|
|
Visibility="{Binding VsMgr.QuestionPointDownMiddleVisibility}"/>
|
|
|
|
<Image Source="/Images/goalkeeper_down_left.png"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="2"
|
|
Visibility="{Binding VsMgr.GoalDownLeftVisibility}"/>
|
|
<Image Source="/Images/football_ball.png"
|
|
Width="50"
|
|
Height="50"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="2"
|
|
Visibility="{Binding VsMgr.BallDownLeftVisibility}"/>
|
|
<Image Source="/Images/white_question_point.png"
|
|
Width="40"
|
|
Height="40"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="2"
|
|
Visibility="{Binding VsMgr.QuestionPointDownLeftVisibility}"/>
|
|
</Grid>
|
|
|
|
<Image Source="/Images/football_ball.png"
|
|
Width="50"
|
|
Height="50"
|
|
VerticalAlignment="Bottom"
|
|
Visibility="{Binding VsMgr.StarterBall}"/>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" SharedSizeGroup="RowGroup"/>
|
|
<RowDefinition Height="*" SharedSizeGroup="RowGroup"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" SharedSizeGroup="ColumnGroup"/>
|
|
<ColumnDefinition Width="*" SharedSizeGroup="ColumnGroup"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Image Source="/Images/whistle.png"
|
|
Grid.Column="1"
|
|
Grid.Row="0"
|
|
Visibility="{Binding WhistleImageVisibility}">
|
|
<Image.RenderTransform>
|
|
<TranslateTransform X="0" Y="0"/>
|
|
</Image.RenderTransform>
|
|
<Image.Effect>
|
|
<DropShadowEffect BlurRadius="10" Color="Black" Direction="315" ShadowDepth="2"/>
|
|
</Image.Effect>
|
|
<Image.Triggers>
|
|
<EventTrigger RoutedEvent="Loaded">
|
|
<BeginStoryboard>
|
|
<Storyboard RepeatBehavior="Forever">
|
|
<DoubleAnimation Storyboard.TargetProperty="RenderTransform.(TranslateTransform.X)"
|
|
Duration="0:0:0.1"
|
|
AutoReverse="True"
|
|
From="0" To="-5" />
|
|
<DoubleAnimation Storyboard.TargetProperty="RenderTransform.(TranslateTransform.Y)"
|
|
Duration="0:0:0.1"
|
|
AutoReverse="True"
|
|
From="0" To="5" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
</Image.Triggers>
|
|
</Image>
|
|
|
|
<TextBlock Text="{Binding ActionText}"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Background="Red"
|
|
FontWeight="Bold"
|
|
FontSize="20"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Visibility="{Binding ActionTextVisibility}"/>
|
|
|
|
</Grid>
|
|
|
|
<Border Margin="80"
|
|
BorderBrush="#FF2196F3"
|
|
Background="#FFFFFF"
|
|
BorderThickness="2"
|
|
CornerRadius="10"
|
|
Padding="20"
|
|
Grid.Row="1"
|
|
Visibility="{Binding ScoreBoardVisibility}">
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Fond du panneau d'affichage -->
|
|
<Grid.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
|
<GradientStop Color="#3F51B5" Offset="0"/>
|
|
<GradientStop Color="#2196F3" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Grid.Background>
|
|
|
|
<Grid Grid.Column="1"
|
|
Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<!-- Score de l'équipe 1 -->
|
|
<TextBlock Text="{Binding Player1ScoreText}"
|
|
Foreground="White"
|
|
FontSize="80"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Margin="20,0,0,0"
|
|
Grid.Column="0"/>
|
|
|
|
<!-- Séparateur central -->
|
|
<TextBlock Text="-"
|
|
Foreground="White"
|
|
FontSize="80"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Grid.Column="1"/>
|
|
|
|
<!-- Score de l'équipe 2 -->
|
|
<TextBlock Text="{Binding Player2ScoreText}"
|
|
Foreground="White"
|
|
FontSize="80"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,20,0"
|
|
Grid.Column="2"/>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
<Border Margin="80"
|
|
BorderBrush="#FF2196F3"
|
|
Background="#FFFFFF"
|
|
BorderThickness="2"
|
|
CornerRadius="10"
|
|
Padding="20"
|
|
Grid.Row="1"
|
|
Visibility="{Binding FinalResultVisibility}">
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Fond du panneau d'affichage -->
|
|
<Grid.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
|
<GradientStop Color="#3F51B5" Offset="0"/>
|
|
<GradientStop Color="#2196F3" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Grid.Background>
|
|
|
|
<Grid Grid.Column="0"
|
|
Grid.ColumnSpan="3"
|
|
Grid.Row="0">
|
|
<TextBlock Text="{Binding FinalWinnerText}"
|
|
Foreground="White"
|
|
FontSize="40"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Margin="20,0,0,0"/>
|
|
</Grid>
|
|
|
|
<Grid Grid.Column="1"
|
|
Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<!-- Score de l'équipe 1 -->
|
|
<TextBlock Text="{Binding Player1ScoreText}"
|
|
Foreground="White"
|
|
FontSize="80"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Margin="20,0,0,0"
|
|
Grid.Column="0"/>
|
|
|
|
<!-- Séparateur central -->
|
|
<TextBlock Text="-"
|
|
Foreground="White"
|
|
FontSize="80"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Grid.Column="1"/>
|
|
|
|
<!-- Score de l'équipe 2 -->
|
|
<TextBlock Text="{Binding Player2ScoreText}"
|
|
Foreground="White"
|
|
FontSize="80"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,20,0"
|
|
Grid.Column="2"/>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
</UserControl>
|