예제 #1
0
        private KunosCareerProgress(string filename)
        {
            _filename = filename;
            _watcher  = KunosLauncherDataWatcher.Subscribe(_filename, () => Reload().Ignore(), () => {
                lock (_ignoreChangesSync) {
                    return((DateTime.Now - _ignoreChanges).TotalSeconds < 1d);
                }
            });

            if (!TryToLoad())
            {
                Reset();
            }
        }
예제 #2
0
        private UserChampionshipsProgress(string filename)
        {
            _filename = filename;
            _watcher  = KunosLauncherDataWatcher.Subscribe(_filename, () => { Reload().Forget(); }, () => {
                lock (_ignoreChangesSync) {
                    return((DateTime.Now - _ignoreChanges).TotalSeconds < 1d);
                }
            });

            if (!TryToLoad())
            {
                Reset();
            }
        }