|
- using System;
- using ArabicSupport;
- using CIG.Translation;
- using UPersian.Utils;
-
- public class PlannedNotification
- {
- public PlannedNotification(int seconds, ILocalizedString description, bool sound = false)
- {
- this.Seconds = seconds;
- this.Sound = sound;
- if (Localization.CurrentCulture.Identifier == "ar")
- {
- this.Description = ArabicFixer.Fix(description.Translate());
- }
- else if (Localization.CurrentCulture.Identifier == "fa")
- {
- this.Description = description.Translate().RtlFix();
- }
- else
- {
- this.Description = description.Translate();
- }
- }
-
- public int Seconds { get; private set; }
-
- public string Description { get; private set; }
-
- public bool Sound { get; private set; }
-
- public bool IsValid
- {
- get
- {
- return this.Seconds > 0;
- }
- }
-
- public static PlannedNotification Empty
- {
- get
- {
- return new PlannedNotification(0, Localization.EmptyLocalizedString, false);
- }
- }
- }
|