/// <summary> /// Clean up /// </summary> public override void Dispose() { // Clean up the service proxy if (_serviceProxy != null) { if (_serviceProxy.State == System.ServiceModel.CommunicationState.Opened) { _serviceProxy.Close(); } _serviceProxy.Dispose(); } // Clean up the callback service proxy if (_callbackServiceProxy != null) { if (_callbackServiceProxy.State == System.ServiceModel.CommunicationState.Opened) { _callbackServiceProxy.Close(); } _callbackServiceProxy.Dispose(); } if (_mpWindowHidden) { SuspendMP(false); } KillBrowserProcess(); }
private void Shutdown() { // Clean up the service proxy try { if (_serviceProxy != null) { if (_serviceProxy.State == CommunicationState.Opened) { _serviceProxy.Close(); } _serviceProxy.Dispose(); } // Clean up the callback service proxy if (_callbackServiceProxy != null) { if (_callbackServiceProxy.State == CommunicationState.Opened) { _callbackServiceProxy.Close(); } _callbackServiceProxy.Dispose(); } } catch { } if (_mpWindowHidden) { SuspendMP(false); } KillBrowserProcess(); }