Пример #1
0
        /// <summary>
        /// This will init a local directory.
        /// </summary>
        /// <param name="path"></param>
        public void InitLocal(string path,ClientThread client, ref RichTextBox richTextBox1)
        {
            this.client = client;
            this.log = richTextBox1;
            IsRemote = false;
            FTPDirectory dir = new FTPDirectory(path, false, null);
            dir.GetDirs();
            dir.GetChildrenDirs();

            // Configure the first tree
            treeListView1.CanExpandGetter = delegate(object x)
            {
                return ((FTPDirectory)x).Children != null;
            };
            treeListView1.ChildrenGetter = delegate(object x) { return ((FTPDirectory)x).GetChildren(); };

            treeListView1.Roots = dir.Children;

            treeListView1.IsSimpleDragSource = true;
            treeListView1.IsSimpleDropSink = true;
        }
Пример #2
0
 public FTPDirectory InitFTPDirectory(string path)
 {
     dir = new FTPDirectory(path, false, null);
     dir.GetDirs();
     dir.GetChildrenDirs();
     return dir;
 }