Ejemplo n.º 1
0
        void trans_ProtocolChange(object sender, FmdcEventArgs e)
        {
            Transfer trans = sender as Transfer;

            if (trans == null)
            {
                return;
            }
            IProtocolTransfer prot = e as IProtocolTransfer;

            if (prot != null)
            {
                prot.ChangeDownloadItem -= Protocol_ChangeDownloadItem;
                prot.RequestTransfer    -= Protocol_RequestTransfer;
            }
            trans.Protocol.ChangeDownloadItem += new FmdcEventHandler(Protocol_ChangeDownloadItem);
            trans.Protocol.RequestTransfer    += new FmdcEventHandler(Protocol_RequestTransfer);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creating Transfer with address and prt.
 /// </summary>
 /// <param name="addy">string representation of a IP/DNS address</param>
 /// <param name="prt">int port representation</param>
 /// <param name="protocol">Protocol to be used by this connection</param>
 public Transfer(string addy, int port, IProtocolTransfer protocol)
     : base(addy, port)
 {
     DownloadItemChanged = new FmdcEventHandler(OnDownloadItemChanged);
     this.Protocol       = protocol;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creating Transfer with address and prt.
 /// </summary>
 /// <param name="addy">string representation of a IP/DNS address</param>
 /// <param name="prt">int port representation</param>
 /// <param name="protocol">Protocol to be used by this connection</param>
 public Transfer(string addy, int port, IProtocolTransfer protocol)
     : base(addy, port)
 {
     DownloadItemChanged = new FmdcEventHandler(OnDownloadItemChanged);
     this.Protocol = protocol;
 }