Exemple #1
0
        void m_statsReader_NewStastics(object sender, NewStatisticsEventArgs e)
        {
            if (e.Statistics != null && m_currentPlayFile != null && m_currentPlayFile.GameFileID.HasValue)
            {
                e.Statistics.MapName      = e.Statistics.MapName.ToUpper();
                e.Statistics.GameFileID   = m_currentPlayFile.GameFileID.Value;
                e.Statistics.SourcePortID = m_currentPlayForm.SelectedSourcePort.SourcePortID;

                if (e.Update)
                {
                    IStatsData stats = DataSourceAdapter.GetStats(e.Statistics.GameFileID).LastOrDefault(x => x.MapName == e.Statistics.MapName);
                    if (stats != null)
                    {
                        DataSourceAdapter.DeleteStats(stats.StatID);
                    }
                }

                DataSourceAdapter.InsertStats(e.Statistics);
            }
        }
 private void statsReader_NewStastics(object sender, DoomLauncher.NewStatisticsEventArgs e)
 {
     m_args.Add(e);
 }