hot fix, sorry juju
continuous-integration/drone/push Build is failing Details

old_branch_before_remy
Jérémy Mouyon 11 months ago
parent 1bd9bd0a53
commit b9183452ec

@ -25,13 +25,9 @@ namespace QwirkleClassLibrary.Players
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
} }
public ReadOnlyObservableCollection<Score> Lb public ReadOnlyObservableCollection<Score> Lb => new(leaderboard);
{
get
{
return (ReadOnlyObservableCollection<Score>)leaderboard.AsReadOnly();
}
}

@ -22,56 +22,62 @@
<RoundRectangle CornerRadius="3"/> <RoundRectangle CornerRadius="3"/>
</Border.StrokeShape> </Border.StrokeShape>
<VerticalStackLayout> <StackLayout>
<controls:LeaderboardLine></controls:LeaderboardLine> <Grid ColumnDefinitions="4*, auto, 2*, auto, 2*, auto, 2*"
<Rectangle/> RowDefinitions="50">
<Label
Text="Player tag"
Style="{StaticResource ContentTab}"
/>
<Rectangle
Style="{StaticResource RectangleTab}"
Grid.Column="1"/>
<Label
Grid.Column="2"
Text="Date"
Style="{StaticResource ContentTab}"/>
<Rectangle
Style="{StaticResource RectangleTab}"
Grid.Column="3"/>
<Label
Grid.Column="4"
Text="Points"
Style="{StaticResource ContentTab}"/>
<Rectangle
Style="{StaticResource RectangleTab}"
Grid.Column="5"/>
<Label
Grid.Column="6"
Style="{StaticResource ContentTab}"
Text="Victories"
/>
<controls:LeaderboardLine></controls:LeaderboardLine> </Grid>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine>
<Rectangle/>
<controls:LeaderboardLine></controls:LeaderboardLine> <CollectionView ItemsSource="{Binding Lb}">
</VerticalStackLayout> <CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Vertical"/>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<controls:LeaderboardLine Name="{Binding Score.PlayerName}"></controls:LeaderboardLine>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</StackLayout>
</Border> </Border>
</VerticalStackLayout> </VerticalStackLayout>
</ScrollView> </ScrollView>
</ContentPage> </ContentPage>

@ -5,5 +5,7 @@ public partial class Leaderboard : ContentPage
public Leaderboard() public Leaderboard()
{ {
InitializeComponent(); InitializeComponent();
BindingContext = ((App)Application.Current!).LD;
} }
} }

@ -7,7 +7,7 @@
RowDefinitions="50"> RowDefinitions="50">
<Label <Label
Text="Player Tag" Text="{Binding Name}"
Style="{StaticResource ContentTab}" Style="{StaticResource ContentTab}"
/> />
<Rectangle <Rectangle

@ -11,5 +11,15 @@ public partial class LeaderboardLine : ContentView
public LeaderboardLine() public LeaderboardLine()
{ {
InitializeComponent(); InitializeComponent();
BindingContext = this;
}
public static readonly BindableProperty NameProperty =
BindableProperty.Create(nameof(Name), typeof(string), typeof(LeaderboardLine), "");
public string Name
{
get => (string)GetValue(NameProperty);
set => SetValue(NameProperty, value);
} }
} }
Loading…
Cancel
Save