private bool HasWonNow(PerformanceTrophies trophy) { System.DateTime? lastWonDate = (DateTime?)Properties.Settings.Default[trophy.ToString() + "_DATE"]; if (!lastWonDate.HasValue) { Properties.Settings.Default[trophy.ToString() + "_DATE"] = DateTime.Now; Properties.Settings.Default.Save(); return true; } return false; }
private bool HasWonThisMonth(PerformanceTrophies trophy) { System.DateTime? lastWonDate = (DateTime?) Properties.Settings.Default[trophy.ToString() + "_DATE"]; if (!lastWonDate.HasValue || (lastWonDate < System.DateTime.Today && lastWonDate.Value.Month != System.DateTime.Today.Month)) { Properties.Settings.Default[trophy.ToString() + "_DATE"] = DateTime.Now; Properties.Settings.Default.Save(); return true; } return false; }
public bool HasTrophy(PerformanceTrophies trophy) { return(Trophies.Contains(trophy)); }
public bool HasTrophy(PerformanceTrophies trophy) { return Trophies.Contains(trophy); }