public static void Stop_All() { foreach (Device device in devices) { lock (device.running_events) { device.EventListUpdated?.Invoke(device, EventArgs.Empty); device.running_events.Clear(); device.ForceUpdate(); } } }