示例#1
0
 internal void Remove()
 {
     Timer.TimeSlot timeSlot = this.TimeSlot;
     if (timeSlot == null)
     {
         return;
     }
     timeSlot.Count--;
     Timer.Count = Timer.Count - 1;
     Timer.TimerInstance previousInstance = this.PreviousInstance;
     Timer.TimerInstance nextInstance     = this.NextInstance;
     if (nextInstance != null)
     {
         nextInstance.PreviousInstance = previousInstance;
     }
     else
     {
         timeSlot.LastInstance = previousInstance;
     }
     if (previousInstance != null)
     {
         previousInstance.NextInstance = nextInstance;
     }
     else
     {
         timeSlot.FirstInstance = nextInstance;
     }
     this.TimeSlot         = null;
     this.PreviousInstance = null;
     this.NextInstance     = null;
 }
示例#2
0
 internal void Added(Timer.TimeSlot time_slot)
 {
     time_slot.Count++;
     Timer.Count   = Timer.Count + 1;
     this.TimeSlot = time_slot;
 }