Ejemplo n.º 1
0
        public FormSiteScanner( FormFtpClient formMain, Site site, SiteEntry dirStart )
        {
            InitializeComponent();

            this.formMain = formMain;

            this.site = site;
            this.dirStart = dirStart;

            //this.ftp = new FtpClient( site.uri, site.cred );

            //this.outputQueue = new ConcurrentQueue<AccItem>();

            // prep grid
            gridDirs.Columns.Add( "Path", "Path" );
            gridDirs.Columns.Add( "Files", "#Files" );
            gridDirs.Columns.Add( "Dirs", "#Dirs" );
            gridDirs.Columns.Add( "Links", "#Links" );
            gridDirs.Columns.Add( "Size", "Size(b)" );

            gridDirs.Columns["Path"].Width = 200;

            gridDirs.Columns["Files"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            gridDirs.Columns["Dirs"] .DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            gridDirs.Columns["Links"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            gridDirs.Columns["Size"] .DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;

            // give user instructions
            HandleMessageDebug( "Please click Start to begin recursive FTP space usage evaluation.");
        }
Ejemplo n.º 2
0
        public static Site GetSite( AddressBookEntry abEntry )
        {
            if ( ! sites.ContainsKey(abEntry) )
            {
                Site site = new Site( abEntry );
                sites.Add( abEntry, site );
            }

            return sites[abEntry];
        }
Ejemplo n.º 3
0
        public void SetConnection( AddressBookEntry abEntry )
        {
            site = DataWarehouse.GetSite( abEntry );
            site.SiteUpdatedEvent += HandleSiteUpdatedEvent;

            mapTree = new Dictionary<TreeNode, SiteEntry>();

            labelHostName.Text = site.addressBookEntry.host;

            SetAppState( AppState.Busy );

            SiteEntry rootEntry;
            rootEntry = ChangeDir( null, true );

            SetAppState( AppState.Available );

            TreeBuild();
        }