public void ProcessWindow() { lock (this) { PrintData(); if (!cumulativeData) { events.Clear(); } } }