コード例 #1
0
        //-----------------------------------------------------------------------------//
        /// <summary>
        /// LoadChild nodes until the recurseCountdown reaches zero.
        /// </summary>
        /// <param name="recurseCountdown"></param>
        public void LoadNode(int recurseCountdown)
        {
            if (recurseCountdown <= 0)
            {
                return;
            }
            --recurseCountdown;

            if (!this.loaded)
            {
                this.loaded = true;

                try
                {
                    DirectoryInfo[] subdirs = this.di.GetDirectories();
                    foreach (DirectoryInfo subdir in subdirs)
                    {
                        KExplorerNode subNode = new KExplorerNode(subdir);
                        this.Nodes.Add(subNode);
                        subNode.LoadNode(recurseCountdown);
                    }
                }
                catch (Exception)
                {
                }
            }
            else
            {
                foreach (KExplorerNode node in this.Nodes)
                {
                    node.LoadNode(recurseCountdown);
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Construct with the drive letter and a pointer to the main form
 /// </summary>
 /// <param name="newDriveLetter"></param>
 /// <param name="form1"></param>
 public DriveLoaderWorkUnit( KExplorerNode newCreatedDriveNode, string newDriveLetter, ISimpleKexplorerGUI form1, IWorkGUIFlagger flagger )
 {
     this.createdNode = newCreatedDriveNode;
     this.driveLetter = newDriveLetter;
     this.form = form1;
     this.guiFlagger = flagger;
 }
コード例 #3
0
        /// <summary>
        /// Read the tree state of the GUI to figure out what is loaded, where it pointed, whats
        /// the name of the tab.
        /// </summary>
        /// <param name="kexplorerTab"></param>
        private void Initialize(ISimpleKexplorerGUI kexplorerTab)
        {
            if (kexplorerTab.TreeView1.Nodes[0] is KexplorerFtpNode)
            {
                var site = (KexplorerFtpNode)kexplorerTab.TreeView1.Nodes[0];
                this.ftpSite = site.Site;
            }
            else
            {
                KExplorerNode selectedNode = (KExplorerNode)kexplorerTab.TreeView1.SelectedNode;

                if (selectedNode != null)
                {
                    this.currentFolder = selectedNode.DirInfo.FullName;
                }
                else
                {
                    this.currentFolder = "";
                }

                ArrayList tdrives = new ArrayList();

                foreach (KExplorerNode node in kexplorerTab.TreeView1.Nodes)
                {
                    tdrives.Add(node.Text);
                }

                this.drives = (string[])tdrives.ToArray(typeof(string));
            }
        }
コード例 #4
0
        public FolderFinderWorkUnit( string newPathToLookFor,KExplorerNode[] newStartNodes, ISimpleKexplorerGUI newForm, IKExplorerControl newFlagger  )
        {
            this.pathToLookFor = newPathToLookFor;

            this.startNodes = newStartNodes;

            this.form = newForm;

            this.controller = newFlagger;
        }
コード例 #5
0
        public IWorkUnit DoJob()
        {
            IWorkUnit moreWork = null;
            KExplorerNode[] tempNodes = this.startNodes;
            foreach (KExplorerNode node in tempNodes )
            {
                if ( node.DirInfo != null && this.pathToLookFor.Equals( node.DirInfo.FullName ) )
                {

                    this.expandThisNode = node;
                    this.form.MainForm.Invoke( new InvokeDelegate( this.ExpandNode ));
                    break;
                }
                else if ( node.DirInfo != null && this.pathToLookFor.StartsWith( node.DirInfo.FullName ))
                {

                    ///  The node may or may not be loaded.  If not, make sure to at least expand
                    ///  out to here.  Then that will cause another job to get loaded to load it's
                    ///  sub nodes.  Then, we just re-add this task.
                    if ( node.Nodes.Count == 0 )
                    {

                        this.expandThisNode = node;

                        this.form.MainForm.Invoke(new InvokeDelegate( this.ExpandNode ));

                        Pipeline drivePipeline = (Pipeline) this.controller.DrivePipelines[this.pathToLookFor.Substring(0,1)];

                        drivePipeline.AddJob( new FolderWorkUnit( node, this.form, (IWorkGUIFlagger)this.controller ));

                        moreWork = this;
                    }
                    else
                    {
                        /// If the sub-nodes are already created.  We re-add this job, but set it
                        /// to look a the sub-nodes.
                        KExplorerNode[] nextStartNodes = new KExplorerNode[ node.Nodes.Count ];
                        for (int i = 0; i < node.Nodes.Count; i++ )
                        {

                            nextStartNodes[i] = (KExplorerNode)node.Nodes[ i ];
                        }
                        this.startNodes = nextStartNodes;
                        moreWork = this;

                    }

                    break;
                }
            }
            return moreWork;
        }
コード例 #6
0
        //-----------------------------------------------------------------------------//
        /// <summary>
        /// Called from form's invoke, actual treeview operations.
        /// </summary>
        private void AddSubSubNodes()
        {
            lock (this.form.TreeView1)
            {
                KExplorerNode[] nodes = new KExplorerNode[this.subDirs.Length];

                for (int i = 0; i < nodes.Length; i++)
                {
                    nodes[i] = new KExplorerNode(this.subDirs[i]);
                }
                this.currentSubFolderNode.Nodes.AddRange(nodes);
            }
        }
コード例 #7
0
        public IWorkUnit DoJob()
        {
            IWorkUnit moreWork = null;

            KExplorerNode[] tempNodes = this.startNodes;
            foreach (KExplorerNode node in tempNodes)
            {
                if (node.DirInfo != null && this.pathToLookFor.Equals(node.DirInfo.FullName))
                {
                    this.expandThisNode = node;
                    this.form.MainForm.Invoke(new InvokeDelegate(this.ExpandNode));
                    break;
                }
                else if (node.DirInfo != null && this.pathToLookFor.StartsWith(node.DirInfo.FullName))
                {
                    ///  The node may or may not be loaded.  If not, make sure to at least expand
                    ///  out to here.  Then that will cause another job to get loaded to load it's
                    ///  sub nodes.  Then, we just re-add this task.
                    if (node.Nodes.Count == 0)
                    {
                        this.expandThisNode = node;

                        this.form.MainForm.Invoke(new InvokeDelegate(this.ExpandNode));



                        Pipeline drivePipeline = (Pipeline)this.controller.DrivePipelines[this.pathToLookFor.Substring(0, 1)];

                        drivePipeline.AddJob(new FolderWorkUnit(node, this.form, (IWorkGUIFlagger)this.controller));

                        moreWork = this;
                    }
                    else
                    {
                        /// If the sub-nodes are already created.  We re-add this job, but set it
                        /// to look a the sub-nodes.
                        KExplorerNode[] nextStartNodes = new KExplorerNode[node.Nodes.Count];
                        for (int i = 0; i < node.Nodes.Count; i++)
                        {
                            nextStartNodes[i] = (KExplorerNode)node.Nodes[i];
                        }
                        this.startNodes = nextStartNodes;
                        moreWork        = this;
                    }

                    break;
                }
            }
            return(moreWork);
        }
コード例 #8
0
ファイル: KExplorerControl.cs プロジェクト: ox1111/Kexplorer
 //-----------------------------------------------------------------------------//
 /// <summary>
 /// After Expanding a node, make sure two levels deeper are expanded.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TreeView1_AfterExpand(object sender, TreeViewEventArgs e)
 {
     if (!this.isGuiBeingChanged)
     {
         if (e.Node is KExplorerNode)
         {
             KExplorerNode kNode         = (KExplorerNode)e.Node;
             string        drive         = kNode.DirInfo.FullName.Substring(0, 1);
             Pipeline      drivePipeline = (Pipeline)this.drivePipelines[drive];
             drivePipeline.AddJob(new FolderWorkUnit(kNode, this.form, this));
         }
         else
         {
             KexplorerFtpNode ftpNode     = (KexplorerFtpNode)e.Node;
             Pipeline         ftppipeline = (Pipeline)this.drivePipelines[ftpNode.Site.host];
             ftppipeline.AddJob(new FtpFolderWorkUnit(ftpNode, this.form, this));
         }
     }
 }
コード例 #9
0
ファイル: KExplorerControl.cs プロジェクト: ox1111/Kexplorer
        //-----------------------------------------------------------------------------//
        /// <summary>
        /// When a node is selected.  Start the job to load the datagrid.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TreeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            KExplorerNode kNode = (KExplorerNode)e.Node;

            if (kNode.Stale)
            {
                if (kNode.DirInfo == null)
                {
                    string   emptyDrive    = kNode.Text.Substring(0, 1);
                    Pipeline drivePipeline = (Pipeline)this.drivePipelines[emptyDrive];
                    if (drivePipeline == null)
                    {
                        drivePipeline = new Pipeline(this.form);

                        this.drivePipelines[emptyDrive] = drivePipeline;

                        drivePipeline.StartWork();
                    }
                    drivePipeline.AddJob(new DriveLoaderWorkUnit(kNode, emptyDrive, this.form, this));
                }
                else
                {
                    // Refresh the node if it's stale...
                    string drive = kNode.DirInfo.FullName.Substring(0, 1);

                    Pipeline drivePipeline = (Pipeline)this.drivePipelines[drive];
                    if (drivePipeline == null)
                    {
                        drivePipeline = new Pipeline(this.form);

                        this.drivePipelines[drive] = drivePipeline;

                        drivePipeline.StartWork();
                    }
                    drivePipeline.AddJob(new FolderWorkUnit(kNode, this.form, this));
                }

                //this.pipeline.AddJob( new FolderWorkUnit( kNode, this.form, this ) );
            }

            // File List always gets done in the main pipeline.
            this.pipeline.AddPriorityJob(new FileListWorkUnit(kNode, this.form, this));
        }
コード例 #10
0
ファイル: KExplorerControl.cs プロジェクト: ox1111/Kexplorer
 //-----------------------------------------------------------------------------//
 /// <summary>
 /// Flags the most recently clicked node.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TreeView1_MouseDown(object sender, MouseEventArgs e)
 {
     this.clickedNode = (KExplorerNode)this.form.TreeView1.GetNodeAt(e.X, e.Y);
 }
コード例 #11
0
ファイル: KExplorerNode.cs プロジェクト: kcsampson/Kexplorer
        //-----------------------------------------------------------------------------//
        /// <summary>
        /// LoadChild nodes until the recurseCountdown reaches zero.
        /// </summary>
        /// <param name="recurseCountdown"></param>
        public void LoadNode( int recurseCountdown )
        {
            if ( recurseCountdown <= 0 )
            {
                return;
            }
            --recurseCountdown;

            if ( !this.loaded )
            {
                this.loaded = true;

                try
                {
                    DirectoryInfo[] subdirs = this.di.GetDirectories();
                    foreach ( DirectoryInfo subdir in subdirs )
                    {
                        KExplorerNode subNode =  new KExplorerNode(  subdir );
                        this.Nodes.Add( subNode );
                        subNode.LoadNode( recurseCountdown );

                    }
                }
                catch (Exception  )
                {

                }

            }
            else
            {

                foreach ( KExplorerNode node in this.Nodes )
                {
                    node.LoadNode( recurseCountdown );
                }
            }
        }
コード例 #12
0
ファイル: KExplorerControl.cs プロジェクト: ox1111/Kexplorer
        //-----------------------------------------------------------------------------//
        /// <summary>
        /// Initialize with a Form1
        /// </summary>
        /// <param name="newForm"></param>
        public void Initialize(ISimpleKexplorerGUI newForm, string currentFolderName, ArrayList onlyTheseDrives)
        {
            this.form = newForm;

            this.pipeline = new Pipeline(this.form);
            this.pipeline.StartWork();

            this.drivePipelines = new Hashtable();

            newForm.WatchingForFolder = currentFolderName;


            string[] drives = null;

            if (onlyTheseDrives != null && onlyTheseDrives.Count > 0)
            {
                drives = (string[])onlyTheseDrives.ToArray(typeof(string));
            }
            else
            {
                drives = System.IO.Directory.GetLogicalDrives();
            }

            foreach (string drive in drives)
            {
                //this.pipeline.AddJob(
                //	new DriveLoaderWorkUnit( drive.Substring( 0, 1), this.form, this ) );

                Pipeline drivePipeline = new Pipeline(this.form);
                this.drivePipelines[drive.Substring(0, 1)] = drivePipeline;
                drivePipeline.StartWork();

                KExplorerNode createdNode = new KExplorerNode(drive.Substring(0, 1));
                this.form.TreeView1.Nodes.Add(createdNode);

                drivePipeline.AddJob(new DriveLoaderWorkUnit(createdNode, drive.Substring(0, 1), this.form, this));
            }

            this.launcher = new Launcher();

            this.launcher.Initialize();


            this.form.TreeView1.AfterExpand += new TreeViewEventHandler(TreeView1_AfterExpand);


            this.form.TreeView1.KeyDown += new KeyEventHandler(TreeView1_KeyDown);


            this.form.TreeView1.AfterSelect += new TreeViewEventHandler(TreeView1_AfterSelect);


            this.form.DataGridView1.KeyDown += new KeyEventHandler(DataGrid1_KeyDown);

            this.form.TreeView1.DoubleClick += new EventHandler(TreeView1_DoubleClick);

            this.form.DataGridView1.DoubleClick += new EventHandler(DataGrid1_DoubleClick);



            this.form.TreeView1.MouseDown += new MouseEventHandler(TreeView1_MouseDown);


            this.InitializeScriptManager();



            this.form.TreeView1.ContextMenu.Popup += new EventHandler(ContextMenu_Popup);

            this.form.DataGridView1.ContextMenuStrip          = this.form.FileGridMenuStrip;
            this.form.DataGridView1.ContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(ContextMenuStrip_Opening);


            if (currentFolderName != null && currentFolderName.Length > 0)
            {
                KExplorerNode driveNode = null;
                foreach (KExplorerNode node in this.form.TreeView1.Nodes)
                {
                    if (currentFolderName.StartsWith(node.Text))
                    {
                        driveNode = node;
                        break;
                    }
                }
                Pipeline drivePipeline = (Pipeline)this.drivePipelines[currentFolderName.Substring(0, 1)];

                drivePipeline.AddJob(new FolderFinderWorkUnit(
                                         currentFolderName, new KExplorerNode[] { driveNode }
                                         , this.form
                                         , this
                                         ));
            }
        }
コード例 #13
0
        //-----------------------------------------------------------------------------//
        /// <summary>
        /// Add the found sub-directories to the current sub dir.
        /// </summary>
        private void AddSubDirsToSubDir()
        {
            lock( this.form.TreeView1 )
            {
                KExplorerNode[] nodes = new KExplorerNode[ this.subDirs.Length ];

                for ( int i = 0; i < nodes.Length; i++ )
                {
                    nodes[i] = new KExplorerNode( this.subDirs[ i ] );
                    nodes[i].Collapse();

                }

                this.currentWorkingSubDir.Nodes.AddRange( nodes );
            }
        }
コード例 #14
0
 //-----------------------------------------------------------------------------//
 /// <summary>
 /// Constructor with a node that is a folder.
 /// </summary>
 /// <param name="newFolderNode"></param>
 /// <param name="newForm"></param>
 public FolderWorkUnit(KExplorerNode newFolderNode, ISimpleKexplorerGUI newForm, IWorkGUIFlagger flagger)
 {
     this.folderNode = newFolderNode;
     this.form       = newForm;
     this.guiFlagger = flagger;
 }
コード例 #15
0
ファイル: FolderWorkUnit.cs プロジェクト: kcsampson/Kexplorer
 //-----------------------------------------------------------------------------//
 /// <summary>
 /// Constructor with a node that is a folder.
 /// </summary>
 /// <param name="newFolderNode"></param>
 /// <param name="newForm"></param>
 public FolderWorkUnit( KExplorerNode newFolderNode, ISimpleKexplorerGUI newForm, IWorkGUIFlagger flagger )
 {
     this.folderNode = newFolderNode;
     this.form = newForm;
     this.guiFlagger = flagger;
 }
コード例 #16
0
        //-----------------------------------------------------------------------------//
        /// <summary>
        /// Job three is to load all directories beneath the first level of directories.
        /// After this, there is no more work created from this.
        /// </summary>
        /// <returns></returns>
        private IWorkUnit DoJobThree()
        {
            try
            {

                foreach ( KExplorerNode dirNode in this.createdNode.Nodes )
                {
                    if ( this.stop )
                    {
                        break;
                    }
                    this.currentWorkingSubDir = dirNode;

                    this.subDirs = null;
                    try
                    {

                        this.subDirs = DirPerfStat.Instance().GetDirectories( dirNode.DirInfo );
                    }
                    catch (Exception )
                    {
                    }

                    if ( this.subDirs != null && this.subDirs.Length > 0 && !this.stop )
                    {
                        try
                        {
                            this.guiFlagger.SignalBeginGUI();

                            this.form.MainForm.Invoke( new InvokeDelegate( this.AddSubDirsToSubDir ));
                        }
                        finally
                        {
                            this.guiFlagger.SignalEndGUI();
                        }
                    }

                }

            }
            finally
            {
                this.currentWorkingSubDir = null;
                this.subDirs = null;
            }

            return null;
        }
コード例 #17
0
 //-------------------------------------------------------------------
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="node"></param>
 /// <param name="newForm"></param>
 /// <param name="flagger"></param>
 public FileListWorkUnit(KExplorerNode node,  ISimpleKexplorerGUI newForm, IWorkGUIFlagger flagger )
 {
     this.kForm = newForm;
     this.kNode = node;
     this.guiFlagger = flagger;
 }
コード例 #18
0
        //-----------------------------------------------------------------------------//
        /// <summary>
        /// Initialize with a Form1
        /// </summary>
        /// <param name="newForm"></param>
        public void Initialize(ISimpleKexplorerGUI newForm, string currentFolderName, ArrayList onlyTheseDrives )
        {
            this.form = newForm;

            this.pipeline = new Pipeline( this.form);
            this.pipeline.StartWork();

            this.drivePipelines = new Hashtable();

            newForm.WatchingForFolder = currentFolderName;

            string[] drives = null;

            if ( onlyTheseDrives != null && onlyTheseDrives.Count > 0 )
            {
                drives = (string[])onlyTheseDrives.ToArray(typeof(string));
            }
            else
            {
                drives = System.IO.Directory.GetLogicalDrives();
            }

            foreach( string drive in drives )
            {
                //this.pipeline.AddJob(
                //	new DriveLoaderWorkUnit( drive.Substring( 0, 1), this.form, this ) );

                Pipeline drivePipeline = new Pipeline( this.form );
                this.drivePipelines[ drive.Substring(0,1) ] = drivePipeline;
                drivePipeline.StartWork();

                KExplorerNode createdNode = new KExplorerNode( drive.Substring( 0, 1) );
                this.form.TreeView1.Nodes.Add( createdNode );

                drivePipeline.AddJob(new DriveLoaderWorkUnit( createdNode, drive.Substring( 0, 1), this.form, this ) );

            }

            this.launcher = new Launcher();

            this.launcher.Initialize();

            this.form.TreeView1.AfterExpand += new TreeViewEventHandler(TreeView1_AfterExpand);

            this.form.TreeView1.KeyDown += new KeyEventHandler(TreeView1_KeyDown);

            this.form.TreeView1.AfterSelect += new TreeViewEventHandler(TreeView1_AfterSelect);

            this.form.DataGridView1.KeyDown += new KeyEventHandler(DataGrid1_KeyDown);

            this.form.TreeView1.DoubleClick += new EventHandler(TreeView1_DoubleClick);

            this.form.DataGridView1.DoubleClick += new EventHandler(DataGrid1_DoubleClick);

            this.form.TreeView1.MouseDown += new MouseEventHandler(TreeView1_MouseDown);

            this.InitializeScriptManager();

            this.form.TreeView1.ContextMenu.Popup +=new EventHandler(ContextMenu_Popup );

            this.form.DataGridView1.ContextMenuStrip = this.form.FileGridMenuStrip;
            this.form.DataGridView1.ContextMenuStrip.Opening +=new System.ComponentModel.CancelEventHandler(ContextMenuStrip_Opening);

            if ( currentFolderName != null && currentFolderName.Length > 0 )
            {
                KExplorerNode driveNode = null;
                foreach ( KExplorerNode node in this.form.TreeView1.Nodes )
                {
                    if ( currentFolderName.StartsWith( node.Text ))
                    {
                        driveNode = node;
                        break;
                    }
                }
                Pipeline drivePipeline = (Pipeline)this.drivePipelines[currentFolderName.Substring(0,1)];

                drivePipeline.AddJob( new FolderFinderWorkUnit(
                    currentFolderName, new KExplorerNode[]{driveNode}
                                        , this.form
                                        , this
                                                    ));

            }
        }
コード例 #19
0
 //-----------------------------------------------------------------------------//
 /// <summary>
 /// Flags the most recently clicked node.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TreeView1_MouseDown(object sender, MouseEventArgs e)
 {
     this.clickedNode  = (KExplorerNode)this.form.TreeView1.GetNodeAt(e.X,e.Y);
 }
コード例 #20
0
ファイル: FolderWorkUnit.cs プロジェクト: kcsampson/Kexplorer
        //-----------------------------------------------------------------------------//
        /// <summary>
        /// Go through each sub-folder and load it's sub-folders.
        /// </summary>
        /// <returns></returns>
        private IWorkUnit DoJobTwo()
        {
            try
            {
                foreach ( KExplorerNode sNode in this.folderNode.Nodes )
                {
                    if ( this.stop )
                    {
                        break;
                    }
                    this.currentSubFolderNode = sNode;

                    if ( sNode.Nodes.Count > 0 && sNode.Stale )
                    {

                        try
                        {
                            this.guiFlagger.SignalBeginGUI();
                            this.form.MainForm.Invoke( new InvokeDelegate( this.ClearSubNode ));
                        }
                        finally
                        {
                            this.guiFlagger.SignalEndGUI();
                        }

                        sNode.Stale = false;

                    }

                    if ( sNode.Nodes.Count == 0 )
                    {
                        try
                        {
                            this.subDirs = null;
                            this.subDirs = DirPerfStat.Instance().GetDirectories( sNode.DirInfo );

                            if ( this.subDirs == null )
                            {
                                this.YouWereAborted();
                            }
                            if ( this.subDirs != null && this.subDirs.Length > 0 && !this.stop )
                            {
                                try
                                {

                                    this.guiFlagger.SignalBeginGUI();
                                    this.form.MainForm.Invoke( new InvokeDelegate( this.AddSubSubNodes ));
                                }
                                finally
                                {
                                    this.guiFlagger.SignalEndGUI();
                                }
                            }
                        }
                        catch (Exception)
                        {
                        }

                    }

                }

            }
            finally
            {
                this.subDirs = null;
                this.currentSubFolderNode = null;
            }

            return null;
        }
コード例 #21
0
        //-----------------------------------------------------------------------------//
        /// <summary>
        /// Go through each sub-folder and load it's sub-folders.
        /// </summary>
        /// <returns></returns>
        private IWorkUnit DoJobTwo()
        {
            try
            {
                foreach (KExplorerNode sNode in this.folderNode.Nodes)
                {
                    if (this.stop)
                    {
                        break;
                    }
                    this.currentSubFolderNode = sNode;

                    if (sNode.Nodes.Count > 0 && sNode.Stale)
                    {
                        try
                        {
                            this.guiFlagger.SignalBeginGUI();
                            this.form.MainForm.Invoke(new InvokeDelegate(this.ClearSubNode));
                        }
                        finally
                        {
                            this.guiFlagger.SignalEndGUI();
                        }

                        sNode.Stale = false;
                    }

                    if (sNode.Nodes.Count == 0)
                    {
                        try
                        {
                            this.subDirs = null;
                            this.subDirs = DirPerfStat.Instance().GetDirectories(sNode.DirInfo);

                            if (this.subDirs == null)
                            {
                                this.YouWereAborted();
                            }
                            if (this.subDirs != null && this.subDirs.Length > 0 && !this.stop)
                            {
                                try
                                {
                                    this.guiFlagger.SignalBeginGUI();
                                    this.form.MainForm.Invoke(new InvokeDelegate(this.AddSubSubNodes));
                                }
                                finally
                                {
                                    this.guiFlagger.SignalEndGUI();
                                }
                            }
                        }
                        catch (Exception)
                        {
                        }
                    }
                }
            }
            finally
            {
                this.subDirs = null;
                this.currentSubFolderNode = null;
            }



            return(null);
        }
コード例 #22
0
ファイル: FolderWorkUnit.cs プロジェクト: kcsampson/Kexplorer
        //-----------------------------------------------------------------------------//
        /// <summary>
        /// Add sub directories.
        /// </summary>
        private void AddSubNodes()
        {
            lock( this.form.TreeView1 )
            {

                KExplorerNode[] nodes = new KExplorerNode[ this.subDirs.Length ];

                for ( int i = 0; i < nodes.Length; i++ )
                {
                    nodes[i] = new KExplorerNode( this.subDirs[i] );

                }
                this.folderNode.Nodes.AddRange( nodes );

            }
        }
コード例 #23
0
 //-------------------------------------------------------------------
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="node"></param>
 /// <param name="newForm"></param>
 /// <param name="flagger"></param>
 public FileListWorkUnit(KExplorerNode node, ISimpleKexplorerGUI newForm, IWorkGUIFlagger flagger)
 {
     this.kForm      = newForm;
     this.kNode      = node;
     this.guiFlagger = flagger;
 }