private void OnRemoteEventCounts() { bool canceled = false; if (this.RemoteEventCounts != null) { int[] actualCounts = (int[])this.revent.ActualCounts.Clone(); if (this.revent.PreviousCounts != null) { for (int i = 0; i < this.revent.ActualCounts.Length; i++) { actualCounts[i] -= this.revent.PreviousCounts[i]; } } // Send individual event notifications for (int i = 0; i < actualCounts.Length; i++) { FbRemoteEventEventArgs args = new FbRemoteEventEventArgs(this.revent.Events[i], actualCounts[i]); this.RemoteEventCounts(this, args); if (args.Cancel) { canceled = true; break; } } if (canceled) { // Requeque this.CancelEvents(); } else { // Requeque this.QueueEvents(); } } }