diff --git a/GreadyPoang.EntityLayer/Enums/GamePointStatus.cs b/GreadyPoang.EntityLayer/Enums/GamePointStatus.cs index 8b2f684..46e7f1d 100644 --- a/GreadyPoang.EntityLayer/Enums/GamePointStatus.cs +++ b/GreadyPoang.EntityLayer/Enums/GamePointStatus.cs @@ -5,5 +5,6 @@ public enum GamePointStatus New = 0, InProgress = 1, Completed = 2, - Cancelled = 3 + Cancelled = 3, + Winning = 4 } diff --git a/GreadyPoang.EntityLayer/HelperEntities/RoundBuilderElement.cs b/GreadyPoang.EntityLayer/HelperEntities/RoundBuilderElement.cs index 1b6c854..f956bf7 100644 --- a/GreadyPoang.EntityLayer/HelperEntities/RoundBuilderElement.cs +++ b/GreadyPoang.EntityLayer/HelperEntities/RoundBuilderElement.cs @@ -123,6 +123,4 @@ public class RoundBuilderElement : EntityBase } - - } diff --git a/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs b/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs index 08099ef..234e2c3 100644 --- a/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs +++ b/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs @@ -107,6 +107,8 @@ public class RoundRunningViewModel : ViewModelBase } + + public ObservableCollection Get() { @@ -246,6 +248,11 @@ public class RoundRunningViewModel : ViewModelBase { player.Values.Add(element.GameRegPoints.ToString()); player.PlayerPoints += element.GameRegPoints; + if (player.PlayerPoints > 10000) + { + var winner = RoundElements.FirstOrDefault(e => e.ParticipantId == player.PlayerId); + winner.Status = GamePointStatus.Winning; + } } //oldPart = element.ParticipantId; diff --git a/GreadyPoang/Resources/Styles/AppStyles.xaml b/GreadyPoang/Resources/Styles/AppStyles.xaml index e297278..2a2c39d 100644 --- a/GreadyPoang/Resources/Styles/AppStyles.xaml +++ b/GreadyPoang/Resources/Styles/AppStyles.xaml @@ -55,6 +55,9 @@ + + + diff --git a/GreadyPoang/Views/RoundRunningView.xaml b/GreadyPoang/Views/RoundRunningView.xaml index a02cc12..44bd68d 100644 --- a/GreadyPoang/Views/RoundRunningView.xaml +++ b/GreadyPoang/Views/RoundRunningView.xaml @@ -34,6 +34,7 @@ Padding="10" Margin="5" StrokeShape="RoundRectangle 10" + BackgroundColor="{Binding OverrideColor}" Style="{StaticResource StatusBorderStyle}">