public NotificationData(string title, string body, uint delaySeconds, bool repeat) { Title = title; Body = body; FireDelaySeconds = delaySeconds; FireDate = DateTime.Now.AddSeconds(delaySeconds); Repeat = repeat; RepeatInterval = GameCalendarUnit.Day; RepeatCalendar = GameCalendarIdentifier.ChineseCalendar; }
public NotificationData(string title, string body, DateTime fireDate, bool repeat) { Title = title; Body = body; TimeSpan span = fireDate.Subtract(DateTime.Now); FireDelaySeconds = (uint)span.TotalSeconds; // (uint)(fireDate - DateTime.Now).TotalSeconds; FireDate = fireDate; Repeat = repeat; RepeatInterval = GameCalendarUnit.Day; RepeatCalendar = GameCalendarIdentifier.ChineseCalendar; }