public void FileManagerUpdateButton_ClickHandler(object sender, EventArgs e) { UpdateDirectoryContentPanel(); UpdateFileSystemTree(FilemanagerTreeControl); UpdateHeader(); ActionPanel.SetActiveView(FolderContentView); }
public void FileManagerHeaderLink_Command_Handler(object sender, CommandEventArgs e) { NavigateTo((string)e.CommandArgument); ActionPanel.SetActiveView(FolderContentView); ClearSelectedDirectories(); ClearSelectedFiles(); }
public void FileManagerRenameButton_ClickHandler(object sender, EventArgs e) { if (SelectedFiles.Length != 0) { FileManagerOldNameTextBox.Text = SelectedFiles[0]; ActionPanel.SetActiveView(RenameView); } }
public void FileManagerFilemanagerTreeControl_SelectedNodeChanged_Handler(object sender, EventArgs e) { TreeNode selectedNode = FilemanagerTreeControl.SelectedNode; var path = GetNodePath(selectedNode); NavigateTo(path); ActionPanel.SetActiveView(FolderContentView); ClearSelectedDirectories(); ClearSelectedFiles(); }
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(); }
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(); }
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(); }
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); }
public void CancelRenameButton_ClickHandler(object sender, EventArgs e) { ActionPanel.SetActiveView(FolderContentView); ClearSelectedDirectories(); ClearSelectedFiles(); }
public void CancelCreateDirectoryButton_ClickHandler(object sender, EventArgs e) { ActionPanel.SetActiveView(FolderContentView); }
public void CreateDirectoryButton_ClickHandler(object sender, EventArgs e) { ActionPanel.SetActiveView(FolderContentView); Cache.Remove(RootDir); Directory.CreateDirectory(RootDir + RequestedPath + "\\" + FileManagerDirectoryNameTextBox.Text); }
public void FileManagerAddFoldersToZipButton_ClickHandler(object sender, EventArgs e) { ActionPanel.SetActiveView(AddToZipView); }
public void FileManagerCreateDirectoryButton_ClockHandler(object sender, EventArgs e) { ActionPanel.SetActiveView(CreateDirectoryView); }
public void FileManagerMoveButton_ClickHandler(object sender, EventArgs e) { ActionPanel.SetActiveView(MoveView); moveTree.Nodes = GetFileSystemTree(RootDir, true); }
public void FileManagerUploadButton_ClickHandler(object sender, EventArgs e) { ActionPanel.SetActiveView(UploadView); }