private void Alert(SessionsCollection sessions) { if (Config<UserSettings>.Instance.ShowRace) { foreach (var r in sessions.RaceSessions.Where(s => s.IsLowAlert)) { if (Notify(r)) return; } } if (Config<UserSettings>.Instance.ShowQual) { foreach (var q in sessions.QualSessions.Where(s => s.IsLowAlert)) { if (Notify(q)) return; } } if (Config<UserSettings>.Instance.ShowTT) { foreach (var t in sessions.TTSessions.Where(s => s.IsLowAlert)) { if (Notify(t)) return; } } }
public iNotifierViewModel() { Sessions = new SessionsCollection(); WeekendInfo = new SessionSpotter.WeekendInfo(); RestoreDefaultsCommand = new DelegateCommand(() => { Config<UserSettings>.Instance.SetDefaults(); RaisePropertyChanged(); //This needs to be called for some reason }); RefreshCommand = new DelegateCommand(UpdateSessions); NavigateToSeasonSchedule = new DelegateCommand(() => { Process.Start("http://members.iracing.com/membersite/member/SelectSeries.do?&season=" + WeekendInfo.SeasonID); }); }