private void client_Disconnect() { int IsDisconnected; mySabreAPI = null; IsDisconnected = MySabreAPI.clientDisconnect(); if (IsDisconnected.Equals(0)) { IsConnected = false; Listenercount = 0; } }
private void CloseObjects() { if (this.InvokeRequired) { this.Invoke(new SenderInvoker(CloseObjects)); } else { try { int IsDisconnected; mySabreAPI = null; IsDisconnected = MySabreAPI.clientDisconnect(); } catch { } try { string emuapi = "emuapi"; int hVal = MySabreAPI.GetModuleHandle(ref emuapi); if (hVal != 0) { while (MySabreAPI.FreeLibrary(hVal)) { } } } catch {} Application.Exit(); frmLogin frm = (frmLogin)Application.OpenForms["frmLogin"]; if (frm != null) { frm.Dispose(); } } }
private static void client_Disconnect() { int IsDisconnected; IsDisconnected = MySabreAPI.clientDisconnect(); }