예제 #1
0
 public void FileManagerUpdateButton_ClickHandler(object sender, EventArgs e)
 {
     UpdateDirectoryContentPanel();
     UpdateFileSystemTree(FilemanagerTreeControl);
     UpdateHeader();
     ActionPanel.SetActiveView(FolderContentView);
 }
예제 #2
0
 public void FileManagerHeaderLink_Command_Handler(object sender, CommandEventArgs e)
 {
     NavigateTo((string)e.CommandArgument);
     ActionPanel.SetActiveView(FolderContentView);
     ClearSelectedDirectories();
     ClearSelectedFiles();
 }
예제 #3
0
 public void FileManagerRenameButton_ClickHandler(object sender, EventArgs e)
 {
     if (SelectedFiles.Length != 0)
     {
         FileManagerOldNameTextBox.Text = SelectedFiles[0];
         ActionPanel.SetActiveView(RenameView);
     }
 }
예제 #4
0
        public void FileManagerFilemanagerTreeControl_SelectedNodeChanged_Handler(object sender, EventArgs e)
        {
            TreeNode selectedNode = FilemanagerTreeControl.SelectedNode;
            var      path         = GetNodePath(selectedNode);

            NavigateTo(path);
            ActionPanel.SetActiveView(FolderContentView);
            ClearSelectedDirectories();
            ClearSelectedFiles();
        }
예제 #5
0
        public void RenameButton_ClickHandler(object sender, EventArgs e)
        {
            if (SelectedFiles.Count() > 0)
            {
                File.Move(RootDir + RequestedPath + "\\" + SelectedFiles[0], RootDir + RequestedPath + "\\" + FileManagerNewNameTextBox.Text);
            }

            ActionPanel.SetActiveView(FolderContentView);
            ClearSelectedDirectories();
            ClearSelectedFiles();
        }
예제 #6
0
        public void CopyButton_ClickHandler(object sender, EventArgs e)
        {
            ActionPanel.SetActiveView(FolderContentView);

            var path = RootDir + copyTree.SelectedNode + "\\";

            foreach (string fileName in SelectedFiles)
            {
                File.Copy(RootDir + RequestedPath + "\\" + fileName, path + fileName);
            }
            foreach (string directoryName in SelectedDirectories)
            {
                var directory = new DirectoryInfo(RootDir + RequestedPath + "\\" + directoryName);
                directory.Copy(RootDir + RequestedPath + "\\" + directoryName, path + directoryName);
            }
            Cache.Remove(RootDir);
            ClearSelectedDirectories();
            ClearSelectedFiles();
        }
예제 #7
0
        public void AddToZipButton_ClickHandler(object sender, EventArgs e)
        {
            string directoryFilter = string.Join("|", SelectedDirectories);

            if (!string.IsNullOrEmpty(directoryFilter))
            {
                directoryFilter = "(" + directoryFilter + ")";
            }
            else
            {
                directoryFilter = "^(.*)";
            }

            string fileFilter = string.Join("|", SelectedFiles);

            if (string.IsNullOrEmpty(fileFilter))
            {
                fileFilter = "^(" + FileManagerZipNameTextBox.Text + ")";
            }
            if (SelectedDirectories.Count() != 0)
            {
                fileFilter = "(" + fileFilter + ")|((" + directoryFilter + ")\\\\.*)";
            }
            else
            {
                fileFilter = "(" + fileFilter + ")";
            }


            FastZip zip = new FastZip();

            zip.CreateZip(RootDir + RequestedPath + "\\" + FileManagerZipNameTextBox.Text, RootDir + RequestedPath, true, fileFilter, directoryFilter);
            ActionPanel.SetActiveView(FolderContentView);
            ClearSelectedDirectories();
            ClearSelectedFiles();
        }
예제 #8
0
        public void UploadButton_ClickHandler(object sender, EventArgs e)
        {
            if (FileManagerUpload1.HasFile)
            {
                FileManagerUpload1.SaveAs(RootDir + RequestedPath + "\\" + FileManagerUpload1.FileName);
            }

            if (FileManagerUpload2.HasFile)
            {
                FileManagerUpload2.SaveAs(RootDir + RequestedPath + "\\" + FileManagerUpload2.FileName);
            }

            if (FileManagerUpload3.HasFile)
            {
                FileManagerUpload3.SaveAs(RootDir + RequestedPath + "\\" + FileManagerUpload3.FileName);
            }

            if (FileManagerUpload4.HasFile)
            {
                FileManagerUpload4.SaveAs(RootDir + RequestedPath + "\\" + FileManagerUpload4.FileName);
            }

            ActionPanel.SetActiveView(FolderContentView);
        }
예제 #9
0
 public void CancelRenameButton_ClickHandler(object sender, EventArgs e)
 {
     ActionPanel.SetActiveView(FolderContentView);
     ClearSelectedDirectories();
     ClearSelectedFiles();
 }
예제 #10
0
 public void CancelCreateDirectoryButton_ClickHandler(object sender, EventArgs e)
 {
     ActionPanel.SetActiveView(FolderContentView);
 }
예제 #11
0
 public void CreateDirectoryButton_ClickHandler(object sender, EventArgs e)
 {
     ActionPanel.SetActiveView(FolderContentView);
     Cache.Remove(RootDir);
     Directory.CreateDirectory(RootDir + RequestedPath + "\\" + FileManagerDirectoryNameTextBox.Text);
 }
예제 #12
0
 public void FileManagerAddFoldersToZipButton_ClickHandler(object sender, EventArgs e)
 {
     ActionPanel.SetActiveView(AddToZipView);
 }
예제 #13
0
 public void FileManagerCreateDirectoryButton_ClockHandler(object sender, EventArgs e)
 {
     ActionPanel.SetActiveView(CreateDirectoryView);
 }
예제 #14
0
 public void FileManagerMoveButton_ClickHandler(object sender, EventArgs e)
 {
     ActionPanel.SetActiveView(MoveView);
     moveTree.Nodes = GetFileSystemTree(RootDir, true);
 }
예제 #15
0
 public void FileManagerUploadButton_ClickHandler(object sender, EventArgs e)
 {
     ActionPanel.SetActiveView(UploadView);
 }