public void Clear() { timeModels = new List <PostTime>(); TempTime = null; PostTemplate = null; ChosesDates = new List <DateTime>(); }
public void DeleteDate(System.String time, PostTime postTime) { DataBase db = Singleton.GetInstance().Context; timeModels.Remove(timeModels.Where(p => p.Time.TimeOfDay.ToString() == time).FirstOrDefault()); db._postTime.Remove(postTime); }
private void PostSharedEvents() { DateTime _Now = Now(); if (PostTime <= _Now) { PostTime = _Now + TimeSpan.FromHours(12); Settings.SetString("SharedCalendarPost", PostTime.ToString(CultureInfo.InvariantCulture)); using ShareCalendarWindow Dlg = new ShareCalendarWindow(Settings); Dlg.PostSharedEvents(MushroomInfoList); } }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (DatabaseUser == null ? 0 : DatabaseUser.GetHashCode()); hash = hash * 23 + (Event == null ? 0 : Event.GetHashCode()); hash = hash * 23 + (Object == null ? 0 : Object.GetHashCode()); hash = hash * 23 + (PostTime == default(DateTime) ? 0 : PostTime.GetHashCode()); hash = hash * 23 + (Schema == null ? 0 : Schema.GetHashCode()); hash = hash * 23 + (Tsql == null ? 0 : Tsql.GetHashCode()); hash = hash * 23 + (XmlEvent == null ? 0 : XmlEvent.GetHashCode()); return(hash); } }
/// <summary> /// Handles the shared calendar event. /// </summary> public void OnSharedCalendar() { using ShareCalendarWindow Dlg = new ShareCalendarWindow(Settings); bool?Result = Dlg.ShowDialog(); if (Result.HasValue && Result.Value) { if (Dlg.IsEventActive) { if (PostTime == DateTime.MaxValue) { PostTime = Now(); Settings.SetString("SharedCalendarPost", PostTime.ToString(CultureInfo.InvariantCulture)); } PostSharedEvents(); } else { PostTime = DateTime.MaxValue; Settings.SetString("SharedCalendarPost", string.Empty); } } }
public void SubMinute(PostTime time) => time.Time.AddMinutes(5);
public void SubHour(PostTime postTime) => postTime.Time.AddHours(-1);
public void PlusHour(PostTime time) => time.Time.AddHours(5);
public void PlusMinute(PostTime time) => time.Time.AddMinutes(5);