public cDateTimeAlarm(string name, cDate date, cTime time, CallFunc method) : base(name, method) { m_AlreadyRun = false; m_Date = date; m_Time = time; }
// end of Set Date/Time #endregion #region Alarms /// <summary> /// Sets the alarm. /// </summary> /// <returns> /// 1 on success, 0 on failure. /// </returns> /// <param name='alarmName'> /// The name of the alarm. /// </param> /// <param name='date'> /// The date that the alarm should /// go off on. /// </param> /// <param name='method'> /// The method to call when the /// alarm goes off. /// </param> public static int setAlarm(string alarmName, cDate date, CallFunc method) { cAlarm alarm = new cDateAlarm(alarmName, date, method); mAlarms.AddAlarm(ref alarm); return(1); }
public static DateTime ConvertJalaliStringToDateTime(string input) { var cDate = new cDate(1); cDate.fromJalali(input); return(cDate.ToDateTime()); }
public static int ConvertJalaliStringToGregorianInt(string input) { cDate cDate = new cDate(1); cDate.fromJalali(input); DateTime dateTime = cDate.ToDateTime(); return(Convert.ToInt32(dateTime.Year + dateTime.Month.ToString("00") + dateTime.Day.ToString("00"))); }
/// <summary> /// Sets the alarm. /// </summary> /// <returns> /// 1 on success, 0 on failure. /// </returns> /// <param name='alarmName'> /// The name of the alarm. /// </param> /// <param name='date'> /// The date that the alarm should /// go off on. /// </param> /// <param name='method'> /// The method to call when the /// alarm goes off. /// </param> public static int setAlarm(string alarmName, cDate date, CallFunc method) { cAlarm alarm = new cDateAlarm(alarmName,date,method); mAlarms.AddAlarm(ref alarm); return 1; }