/// <summary> /// Get the next callback /// </summary> /// <returns></returns> protected void NotifyAll(int iNewVal) { if (TriggerQue != null) { //System.Diagnostics.Debug.WriteLine(string.Format("Counter Change ={0} Prior={1} Queue={2}", // iNewVal, _priorTrigger, TriggerQue.CallbackCount)); if (iNewVal == 0) { _priorTrigger = 0; } else { if (iNewVal <= _priorTrigger) { _priorTrigger = iNewVal - 1; } D.delBool_Int del = null; do { del = TriggerQue.GetNextCallback(); if (del != null) { _priorTrigger++; del(_priorTrigger); //System.Diagnostics.Debug.WriteLine(string.Format("Counter Fired {0}", // _priorTrigger)); } } while (_priorTrigger < iNewVal && del != null); } } }
/// <summary> /// Get the next callback /// </summary> /// <returns></returns> protected D.ObjectEventHandler GetNextCallback() { if (TriggerQue != null) { return(TriggerQue.GetNextCallback()); } return(null); }
private void OnChangedValue(Millimeters val) { if (TriggerQue != null) { MillimeterEventHandler delCallback = TriggerQue.GetNextCallback(); if (delCallback != null) { delCallback(val); } } }