public void Close() { AllowClose = true; TimerGetPositionEnabled = false; timerGetPosition.Stop(); watcher.Stop(); if (apiAccess.MpcProcess != null) { apiAccess.MpcProcess.CloseMainWindow(); System.Threading.Thread.Sleep(200); } }