Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 public bool HasTrophy(PerformanceTrophies trophy)
 {
     return(Trophies.Contains(trophy));
 }
Ejemplo n.º 4
0
 public bool HasTrophy(PerformanceTrophies trophy)
 {
     return Trophies.Contains(trophy);
 }