private void FileSendDetailListView_FormClosing(object sender, FormClosingEventArgs e) { try { if (SendFileForms.Contain(this.formKey)) { e.Cancel = true; Hide(); } else { FileSendDetailListViews.RemoveForm(this.formKey); } } catch (Exception exception) { Logger.error(exception.ToString()); } }
private void SendFileForm_FormClosed(object sender, FormClosedEventArgs e) { try { if (SendFileForms.Contain(this.formKey)) { SendFileForms.RemoveForm(this.formKey); Logger.info("SendFileForms.Remove(key) :" + this.formKey); } connection.FTPSendingProgressed -= DisplayOnFTPSendingProgressed; connection.FTPSendingFinished -= DisplayOnFTPSendingFinished; connection.FTPSendingCanceled -= DisplayOnFTPSendingCanceled; connection.FTPSendingFailed -= DisplayOnFTPSendingFailed; connection.FTPSendingAccepted -= ProcessOnFTPSendingAccepted; connection.FTPSendingRejected -= ProcessOnFTPSendingRejected; } catch (Exception ex) { Logger.error(ex.ToString()); } }