Beispiel #1
0
 private void DeserilizeObjects()
 {
     try
     {
         pmaInfo    = PMAInfo.Deserialize(File.ReadAllText(Path.Combine(configManager.CurrentAppConfigDir, PMAInfo.PMA_INFO_FILE)));
         emailsInfo = Emails.Deserialize(File.ReadAllText(Path.Combine(configManager.CurrentAppConfigDir, Emails.EMAILS_INFO_FILE)));
         smtpInfo   = SmtpInfo.Deserialize(File.ReadAllText(Path.Combine(configManager.CurrentAppConfigDir, SmtpInfo.SMTP_INFO_FILE)));
         ftpInfo    = FTPInfo.Deserialize(File.ReadAllText(Path.Combine(configManager.CurrentAppConfigDir, FTPInfo.FTP_INFO_FILE)));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 //--------------------------------------------------------------------------------------------
 /// <summary>
 /// Initilizes the FTP object.
 /// </summary>
 private void InitilizeFTPObject()
 {
     if (FtpInfo == null)
     {
         if (File.Exists(Path.Combine(CurrentAppConfigDir, FTPInfo.FTP_INFO_FILE)))
         {
             FtpInfo = FTPInfo.Deserialize(File.ReadAllText(Path.Combine(CurrentAppConfigDir, FTPInfo.FTP_INFO_FILE)));
         }
         else
         {
             FtpInfo = new FTPInfo();
         }
     }
 }