101 lines
5.8 KiB
XML
101 lines
5.8 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
xmlns:partial="clr-namespace:GreadyPoang.ViewsPartial"
|
|
x:Class="GreadyPoang.Views.RoundRunningView"
|
|
xmlns:vm ="clr-namespace:GreadyPoang.CommandClasses"
|
|
xmlns:behaviors="clr-namespace:GreadyPoang.Common;assembly=GreadyPoang.Common"
|
|
xmlns:local="clr-namespace:GreadyPoang.EntityLayer;assembly=GreadyPoang.EntityLayer"
|
|
xmlns:model="clr-namespace:GreadyPoang.EntityLayer;assembly=GreadyPoang.EntityLayer"
|
|
x:DataType="vm:RoundRunningViewModelCommands">
|
|
<!--Title="RoundRunningView"-->
|
|
|
|
<Border Style="{StaticResource Border.Page}" StrokeThickness="4">
|
|
<Grid Style="{StaticResource Grid.Page}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<partial:HeaderView Grid.Row="0"
|
|
Grid.ColumnSpan="2"
|
|
ViewTitle="Starta eller fortsätt en registrerad Runda"
|
|
ViewDescription="Deltagarna visas först!" />
|
|
<CollectionView Grid.Row="1"
|
|
ItemsSource="{Binding RoundElements}"
|
|
ItemsLayout="HorizontalList"
|
|
Margin="2">
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate x:DataType="model:RoundBuilderElement">
|
|
<Border Stroke="Gray"
|
|
Padding="10"
|
|
Margin="5"
|
|
StrokeShape="RoundRectangle 10"
|
|
Style="{StaticResource StatusBorderStyle}">
|
|
<Border.GestureRecognizers>
|
|
<TapGestureRecognizer
|
|
Command="{Binding Source={RelativeSource AncestorType={x:Type ContentPage}}, Path=BindingContext.ParticipantTappedCommand}"
|
|
CommandParameter="{Binding .}" />
|
|
</Border.GestureRecognizers>
|
|
<Grid VerticalOptions="Fill" >
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Text="Spelare" />
|
|
<Label Grid.Row="1" Text="{Binding ParticipantName}" FontAttributes="Bold" Style="{StaticResource StatusLabelStyle}" />
|
|
<Label Grid.Row="2" Text="{Binding GameRegPoints, StringFormat='Poäng: {0}'}" Style="{StaticResource StatusLabelStyle}" />
|
|
<Label Grid.Row="3" Text="{Binding Status}" Style="{StaticResource StatusLabelStyle}"/>
|
|
<Label Grid.Row="4" Text="{Binding GameRoundStartDate, StringFormat='Start: {0:yyyy-MM-dd}'}" Style="{StaticResource StatusLabelStyle}"/>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
<BoxView
|
|
Grid.Row="2"
|
|
Grid.ColumnSpan="2"
|
|
Margin="0,0,0,5"
|
|
HeightRequest="1"
|
|
Color="Black" />
|
|
<Border Grid.Row="3">
|
|
<HorizontalStackLayout>
|
|
<Grid VerticalOptions="Fill">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Text="{Binding BuilderObject.GameRoundId, StringFormat='Runda: {0}'}"/>
|
|
<Label Grid.Row="1" Text="{Binding BuilderObject.ParticipantName}" FontAttributes="Bold" FontSize="Subtitle" />
|
|
<Entry Grid.Row="2" x:Name="Points" Placeholder="Latest Points" Text="{Binding BuilderObject.GameRegPoints}" FontAttributes="Bold" FontSize="20" >
|
|
<Entry.Behaviors>
|
|
<behaviors:DigitsOnlyBehavior/>
|
|
<behaviors:EventToCommandBehavior EventName="Completed"
|
|
Command="{Binding StoreAndHandlePointsCommand}" />
|
|
</Entry.Behaviors>
|
|
</Entry>
|
|
</Grid>
|
|
<Button Text="Register Points"
|
|
Style="{StaticResource HoverButtonRedStyle}"
|
|
Command="{Binding StoreAndHandlePointsCommand}"/>
|
|
</HorizontalStackLayout>
|
|
</Border>
|
|
<ScrollView Grid.Row="4" Orientation="Horizontal">
|
|
<Grid
|
|
x:Name="ScoreGrid"
|
|
ColumnSpacing="5"
|
|
RowSpacing="5"
|
|
Padding="3"
|
|
HorizontalOptions="FillAndExpand"
|
|
VerticalOptions="FillAndExpand" />
|
|
</ScrollView>
|
|
</Grid>
|
|
</Border>
|
|
</ContentView> |