Exemple #1
0
        public void SetSprinklerAlarm(ISprinkler sprinkler)
        {
            Sprinkler waterThingy = sprinkler as Sprinkler;
            AlarmManager.Global.RemoveAlarm(waterThingy.mAutoWaterAlarm);
            waterThingy.mAutoWaterAlarm = AlarmHandle.kInvalidHandle;

            waterThingy.mAutoWaterAlarm = base.AddAlarmDay(kAutoWaterTimeOfDay, ~DaysOfTheWeek.None, new AlarmTimerCallback(this.TurnOnUpgradedSprinkler), "Auto Water Sprinkler On", AlarmType.NeverPersisted);
        }
Exemple #2
0
        public static void RemoveEAAlarms(ISprinkler sprinkler)
        {
            Sprinkler waterThingy = sprinkler as Sprinkler;
            AlarmManager.Global.RemoveAlarm(waterThingy.mProcessingAlarm);
            waterThingy.mProcessingAlarm = AlarmHandle.kInvalidHandle;

            AlarmManager.Global.RemoveAlarm(waterThingy.mAutoWaterAlarm);
            waterThingy.mAutoWaterAlarm = AlarmHandle.kInvalidHandle;                     
        }