private void FileTransferDlg_FormClosing(object sender, FormClosingEventArgs e) { FileTransfer transfer = new FileTransfer(); if (ttclient.GetFileTransferInfo(transferid, ref transfer)) { ttclient.CancelFileTranfer(transferid); } }