public static string clbFormat(EventOfDay eod) { return(string.Format("{0}\t\t{1}:{2}\tto:\t{3}:{4}", eod.EventName, addZero(eod.StartTime.X), addZero(eod.StartTime.Y), addZero(eod.EndTime.X), addZero(eod.EndTime.Y))); }
public void createNewEvent() { EDay = new EventOfDay(); EDay.Date = CurrentDate; date2String = EDay.Date.ToString(); EDay.EventName = txtName.Text; EDay.StartTime = new Point(int.Parse(udFHour.Text), int.Parse(udFMinute.Text)); EDay.EndTime = new Point(int.Parse(udTHour.Text), int.Parse(udTMinute.Text)); }
public static string getID(EventOfDay eod) { string id = ""; id += addZero(eod.Date.Month); id += addZero(eod.Date.Day); id += addZero(eod.StartTime.X); id += addZero(eod.EndTime.X); return(id); }
public static string loadStatus(EventOfDay eod) { int nh = DateTime.Now.Hour; int nm = DateTime.Now.Minute; int fh = eod.StartTime.X; int fm = eod.StartTime.Y; int th = eod.EndTime.X; int tm = eod.EndTime.Y; if (eod.Date.Year == DateTime.Now.Year && eod.Date.Month == DateTime.Now.Month && eod.Date.Day == DateTime.Now.Day) { if (fh > nh || (fh == nh && fm > nm)) { return("NOT STARTED"); } else if (th < nh || (th == nh && tm < nm)) { return("COMPLETED"); } else if ((fh < nh && th > nh) || (fh == nh && fm < nm && th > nh) || (fh < nh && th == nh && tm > nm) || (fh == nh && fm < nm && th == nh && tm > nm)) { return("ONGOING"); } else { return(null); } } else if (eod.Date.Year > DateTime.Now.Year || eod.Date.Month > DateTime.Now.Month || eod.Date.Day > DateTime.Now.Day) { return("NOT STARTED"); } else { return("COMPLETED"); } }
public void updateList(EventOfDay eod) { eod.EventName = EventPlanner.EDay.EventName; eod.StartTime = EventPlanner.EDay.StartTime; eod.EndTime = EventPlanner.EDay.EndTime; }
public static void listToForm(EventOfDay eod) { EventPlanner.EDay.EventName = eod.EventName; EventPlanner.EDay.StartTime = eod.StartTime; EventPlanner.EDay.EndTime = eod.EndTime; }