void OnTrigger(object sender, TaskScheduler.OnTriggerEventArgs e)
 {
     if (e.Item.GetNextTriggerDateTime() != DateTime.MaxValue)
     {
         writeInfoLogEntry("OnTrigger: Tag: " + e.Item.Tag.ToString() + Environment.NewLine + "Next trigger: " + e.Item.GetNextTriggerDateTime().ToString());
     }
     else
     {
         writeInfoLogEntry("OnTrigger: Tag: " + e.Item.Tag.ToString() + Environment.NewLine + "Next trigger: Never");
     }
 }
Beispiel #2
0
        void triggerItem_OnTrigger(object sender, TaskScheduler.OnTriggerEventArgs e)
        {
            String nextTrigger = String.Empty;

            if (e.Item.GetNextTriggerDateTime() != DateTime.MaxValue)
            {
                nextTrigger = e.Item.GetNextTriggerDateTime().DayOfWeek.ToString() + ", " + e.Item.GetNextTriggerDateTime().ToString();
            }
            else
            {
                nextTrigger = "Never";
            }
            textBoxEvents.AppendText(e.TriggerDate.ToString() + ": " + e.Item.Tag + ", next trigger: " + nextTrigger + "\r\n");
            UpdateTaskList();
        }