| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using System.Linq;
- using YJMPD_UWP.Helpers;
- using YJMPD_UWP.Model.Object;
- namespace YJMPD_UWP.ViewModels
- {
- public class StatisticsVM : TemplateVM
- {
- Statistics st;
- public StatisticsVM() : base("Statistics")
- {
- st = Settings.Statistics;
- }
- public string Information
- {
- get
- {
- return "This page holds all the statistics for " + Settings.Username;
- }
- }
- public string Distance
- {
- get
- {
- return st.Distance + "km";
- }
- }
- public string LeaderCount
- {
- get
- {
- return st.Selected + "";
- }
- }
- public string MatchesCount
- {
- get
- {
- return st.Matches + "";
- }
- }
- public string PointsTotal
- {
- get
- {
- return st.Points.Sum() + "";
- }
- }
- public string PointsAverage
- {
- get
- {
- if (st.Points.Count < 1)
- return "0";
- else
- return (st.Points.Sum() / st.Matches) + "";
- }
- }
- public string PointsMax
- {
- get
- {
- if (st.Points.Count < 1)
- return "0";
- else
- return st.Points.Max() + "";
- }
- }
- public string PointsMin
- {
- get
- {
- if (st.Points.Count < 1)
- return "0";
- else
- return st.Points.Min() + "";
- }
- }
- }
- }
|