private void closeButton_Click(object sender, EventArgs e) { foreach (String channelName in _voiceChannels.Keys) { if (_voiceChannels[channelName].IsJoined()) { sendDDDRequestLeaveVoiceChannelEvent(channelName); } } if (this.m_bLoggedIn) { m_voipclient.DoLogout(); } if (m_voipclient.IsConnected()) { m_voipclient.Disconnect(); } if (m_voipclient.ShutdownSoundSystem()) { updateButtonStates(); m_timer1.Stop(); } m_voipclient.CloseVoIP(); this.ParentForm.Close(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (this.loggedin) { voipclient.DoLogout(); } if (voipclient.IsConnected()) { voipclient.Disconnect(); } if (voipclient.ShutdownSoundSystem()) { updateButtonStates(); timer1.Stop(); } voipclient.CloseVoIP(); }