You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

48 lines
968 B

  1. using System;
  2. using ArabicSupport;
  3. using CIG.Translation;
  4. using UPersian.Utils;
  5. public class PlannedNotification
  6. {
  7. public PlannedNotification(int seconds, ILocalizedString description, bool sound = false)
  8. {
  9. this.Seconds = seconds;
  10. this.Sound = sound;
  11. if (Localization.CurrentCulture.Identifier == "ar")
  12. {
  13. this.Description = ArabicFixer.Fix(description.Translate());
  14. }
  15. else if (Localization.CurrentCulture.Identifier == "fa")
  16. {
  17. this.Description = description.Translate().RtlFix();
  18. }
  19. else
  20. {
  21. this.Description = description.Translate();
  22. }
  23. }
  24. public int Seconds { get; private set; }
  25. public string Description { get; private set; }
  26. public bool Sound { get; private set; }
  27. public bool IsValid
  28. {
  29. get
  30. {
  31. return this.Seconds > 0;
  32. }
  33. }
  34. public static PlannedNotification Empty
  35. {
  36. get
  37. {
  38. return new PlannedNotification(0, Localization.EmptyLocalizedString, false);
  39. }
  40. }
  41. }