예제 #1
0
 public void changeDrive(string drive)
 {
     history = new History(FSScan.inDirectory(null, drive));
     initCommands();
     address = "";
     drawInView();
 }
예제 #2
0
 private void drawDrives()
 {
     foreach (string drive in FSScan.getDrives())
     {
         cb.Items.Add(drive);
     }
     if (cb.Items.Count > 0)
     {
         cb.SelectedIndex = 0;
     }
 }
예제 #3
0
 public void enter(FSItem item)
 {
     if (browserControll.execute(enterID, item))
     {
         FSItem newItem = FSScan.inDirectory(item.getParent, address + "\\" + item.getName);
         item.getFolder().clearChildren();
         foreach (FSItem it in newItem.getFolder().getChildren)
         {
             item.getFolder().addItem(it);
         }
         drawInView();
     }
 }
예제 #4
0
 public void delete(FSItem item)
 {
     if (browserControll.execute(deleteID, item, true))
     {
         FSItem   rootItem = FSScan.inDirectory(history.getRootItem.getParent, address);
         FSItem[] children = rootItem.getFolder().getChildren;
         history.getRootItem.getFolder().clearChildren();
         foreach (FSItem it in children)
         {
             history.getRootItem.getFolder().addItem(it);
         }
         drawInView();
     }
 }
예제 #5
0
        public FileManagerCore(ListBox lb, TextBox tb, ComboBox cb)
        {
            history = new History(FSScan.inDirectory(null, FSScan.getDrives()[0]));
            initCommands();

            this.lb = lb;
            this.tb = tb;
            this.cb = cb;

            cutFlag = false;

            lb.DisplayMember = "getFullName";
            drawInView();

            drawDrives();
        }