Esempio n. 1
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);
    }
Esempio n. 2
0
 /// <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;
 }