/// <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; }
/// <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; }
private void SetDirectoryList(DirectoryListMode value) { _directoryListPresenter = CreateDirectoryList(_directoryListPresenter, value); }
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)); } }