private void OnDestroy() { PPaintCenter.ClientRepaints -= Repaint; MachineCenter.notifier -= ShowNotification; MachineCenter.Stop(); }