Exemplo n.º 1
0
 /// <summary>
 /// The method to set the FTP options
 /// </summary>
 /// <param name="options"></param>
 public void Set(Dictionary <string, string> options)
 {
     _options = new FTPOptions();
     SetConnectionProperties(options["FTPServer"]);
     _options.Inbox  = options["FTPInbox"];
     _options.Outbox = options["FTPOutbox"];
 }
        private void sBwFetchlist()
        {
            if (Engine.ConfigUploaders.FTPAccountList2 != null)
            {
                mAcc = Engine.ConfigUploaders.FTPAccountList2[Engine.ConfigUploaders.FTPSelectedImage];
            }

            bwRemoteViewer.ReportProgress((int)RemoteViewerTask.ProgressType.UPDATE_STATUS_BAR_TEXT,
                                          string.Format("Fetching files from {0}", mAcc.Name));

            if (mAcc != null && !string.IsNullOrEmpty(mAcc.Host))
            {
                FTPOptions fopt = new FTPOptions();
                fopt.Account       = mAcc;
                fopt.ProxySettings = Adapter.CheckProxySettings().GetWebProxy;
                mFTP = new FTPAdapter(fopt);
                List <string> files = FetchList();
                if (files.Count > 0)
                {
                    sBwViewFile(files[0]);
                }
            }
        }