private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (_ClientEngine != null) { _ClientEngine.DetachHandler(NotifyOccured); _ClientEngine.Disconnect(); } }