public cDateTimeAlarm(string name, cDate date, cTime time, CallFunc method)
     : base(name, method)
 {
     m_AlreadyRun = false;
     m_Date = date;
     m_Time = time;
 }
Exemple #2
0
    // 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);
    }
Exemple #3
0
        public static DateTime ConvertJalaliStringToDateTime(string input)
        {
            var cDate = new cDate(1);

            cDate.fromJalali(input);
            return(cDate.ToDateTime());
        }
Exemple #4
0
        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")));
        }
Exemple #5
0
 public cDateTimeAlarm(string name, cDate date, cTime time, CallFunc method) : base(name, method)
 {
     m_AlreadyRun = false;
     m_Date       = date;
     m_Time       = time;
 }
 /// <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;
 }