public StatisticPageViewModel(FightStatistic stats, Grid roundsGrid)
        {
            this.stats      = stats;
            this.roundsGrid = roundsGrid;

            AttackerLostAbs = stats.getAttackerLostAbs().ToString();
            DefenderLostAbs = stats.getDefenderLostAbs().ToString();
            AttackerLostRel = stats.getAttackerLostRel().ToString();
            DefenderLostRel = stats.getDefenderLostRel().ToString();

            buildRoundGrid();
            //loadStatistics();
        }
 private void _Packet(ScSyncResult msg)
 {
     if (msg.result == 1)
     {
         if (Level.current.isPvP)
         {
             FightStatistic.AddPvpAsyncFightTimes();
         }
         else if (Level.current.isPvE)
         {
             FightStatistic.AddPveAsyncFightTimes();
         }
         FightRecordManager.EndRecord(true, true, msg.roomId.ToString());
     }
 }
    public static void InstanceHandle <T>() where T : IGameRecordData
    {
        GameRecorder recorder = new GameRecorder();

        if (recorder.InstanceHandle <T>())
        {
            thread = !IsRecovering ? new RecordLogThread(recorder) : new RecordLogThread(null);
            if (!IsRecovering)
            {
                if (typeof(T) == typeof(GameRecordDataPvp))
                {
                    FightStatistic.AddPvpFightTimes();
                }
                else
                {
                    FightStatistic.AddPveFightTimes();
                }
            }
        }
        else
        {
            thread = null;
        }
    }
 public StatisticPage(FightStatistic stats)
 {
     InitializeComponent();
     BindingContext = new StatisticPageViewModel(stats, roundsGrid);
     NavigationPage.SetHasNavigationBar(this, false);
 }