コード例 #1
0
        public void AddToRecentSplits(string path, IRun run)
        {
            var foundRecentSplitsFile = RecentSplits.FirstOrDefault(x => x.Path == path);

            if (!string.IsNullOrEmpty(foundRecentSplitsFile.Path))
            {
                RecentSplits.Remove(foundRecentSplitsFile);
            }

            var recentSplitsFile = new RecentSplitsFile(path, run);

            RecentSplits.Add(recentSplitsFile);

            while (RecentSplits.Count > 50)
            {
                RecentSplits.RemoveAt(0);
            }
        }
コード例 #2
0
ファイル: Settings.cs プロジェクト: lachszunge/LiveSplit
        public void AddToRecentSplits(string path, IRun run, TimingMethod lastTimingMethod, string lastHotkeyProfile)
        {
            var foundRecentSplitsFile = RecentSplits.FirstOrDefault(x => x.Path == path);

            if (foundRecentSplitsFile.Path != null)
            {
                RecentSplits.Remove(foundRecentSplitsFile);
            }

            var recentSplitsFile = new RecentSplitsFile(path, run, lastTimingMethod, lastHotkeyProfile);

            RecentSplits.Add(recentSplitsFile);

            while (RecentSplits.Count > 50)
            {
                RecentSplits.RemoveAt(0);
            }
        }