Exemplo n.º 1
0
 /// <summary>
 /// Create a new FTP transfer agent.
 /// </summary>
 public FtpSession()
 {
     _remoteHost = "localhost";
     _remotePath = ".";
     _remoteUser = "******";
     _remotePass = "******";
     _remotePort = 21;
     _debug      = false;
     _logined    = false;
     PassiveMode = true;
     _listMode   = DirectoryListMode.PlatformList;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new FTP transfer agent.
 /// </summary>
 public FTPFactory()
 {
     remoteHost = "localhost";
     remotePath = ".";
     remoteUser = "******";
     remotePass = "******";
     remotePort = 21;
     debug = false;
     logined = false;
     passive_mode = true;
     listMode = DirectoryListMode.PlatformList;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new FTP transfer agent.
 /// </summary>
 public FtpSession()
 {
     _remoteHost = "localhost";
     _remotePath = ".";
     _remoteUser = "******";
     _remotePass = "******";
     _remotePort = 21;
     _debug = false;
     _logined = false;
     PassiveMode = true;
     _listMode = DirectoryListMode.PlatformList;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Create a new FTP transfer agent.
 /// </summary>
 public FTPFactory()
 {
     remoteHost   = "localhost";
     remotePath   = ".";
     remoteUser   = "******";
     remotePass   = "******";
     remotePort   = 21;
     debug        = false;
     logined      = false;
     passive_mode = true;
     listMode     = DirectoryListMode.PlatformList;
 }
Exemplo n.º 5
0
 private void SetDirectoryList(DirectoryListMode value)
 {
     _directoryListPresenter = CreateDirectoryList(_directoryListPresenter, value);
 }
Exemplo n.º 6
0
        private IDirectoryListPresenter CreateDirectoryList(IDirectoryListPresenter oldValue, DirectoryListMode mode)
        {
            if (oldValue != null)
            {
                if (oldValue.Mode == mode)
                {
                    return(oldValue);
                }
                else
                {
                    oldValue.Dispose();
                }
            }

            if (mode == DirectoryListMode.LargeIcon)
            {
                return(new LargeIconListPresenter(_directoryListView, _directoryTreePresenter));
            }
            else if (mode == DirectoryListMode.Details)
            {
                return(new DetailsListPresenter(_directoryListView, _directoryTreePresenter));
            }
            else
            {
                throw new ArgumentException("Invalid DirectoryListMode", nameof(mode));
            }
        }