public static ftpservice getInstance(string hostaddr, string usr, string psw, int port, bool connect_mode)
 {
     if (service == null)
     {
         service = new ftpservice(hostaddr, usr, psw, port, connect_mode);
     }
     return(service);
 }
 /// <summary>
 /// 单例模式
 /// </summary>
 public static ftpservice getInstance()
 {
     if (service == null)
     {
         service = new ftpservice();
     }
     return(service);
 }
 public ftpeventlayer(string hostaddress, string username, string password, int port, bool connect_mode)
 {
     ftpsvc = ftpservice.getInstance(hostaddress, username, password, port, connect_mode);
 }
 public ftpeventlayer()
 {
     ftpsvc = ftpservice.getInstance();
 }