示例#1
0
 static FtpHelper()
 {
     try
     {
         string ftpServer = ConfigWorker.GetConfigValue("ftpServer");
         int    ftpPort   = int.Parse(ConfigWorker.GetConfigValue("ftpPort"));
         string ftpUser   = ConfigWorker.GetConfigValue("ftpUser");
         string ftpPwd    = ConfigWorker.GetConfigValue("ftpPwd");
         client = new FtpClient(ftpServer, ftpPort, ftpUser, ftpPwd);
     }
     catch (Exception ex)
     {
         MessageBoxEx.Show("实例化FTP客户端失败:" + ex.Message);
     }
 }
示例#2
0
 static HttpWorker()
 {
     loginUrl    = ConfigWorker.GetConfigValue("loginUrl");
     userListUrl = ConfigWorker.GetConfigValue("userListUrl");
 }