void TransferOpenUI(IQ iq) { FileTransfer fileTransfer = new FileTransfer(Account.Instance.XmppConnection, iq, Roster.Instance.FindContactOrGetNew(iq.From)); FileTransfer.FileTransfers.Add(fileTransfer); try { FileTransferWindow fileTransferWindow = new FileTransferWindow(); fileTransferWindow.Show(); fileTransferWindow.Activate(); } catch (WindowExistsException e) { e.ActivateControl(); } }
void TransferOpenUI(IContact contact, string filename) { FileTransfer fileTransfer = new FileTransfer(Account.Instance.XmppConnection, contact, filename); FileTransfer.FileTransfers.Add(fileTransfer); try { FileTransferWindow fileTransferWindow = new FileTransferWindow(); fileTransferWindow.Show(); fileTransferWindow.Activate(); } catch (WindowExistsException e) { e.ActivateControl(); } }