public EntryListViewItem(FileEntry entry) : base(entry.Name) { this.Entry = entry; this.Entry.ViewItem = this; Update(); }
public static void DeleteFile(FileEntry entry, bool force = true) { if (force || MessageBox.Show(String.Format("Are you sure you want to delete the item '{0}'?", entry.Name), "Delete Confirmation", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { entry.Parent.RemoveEntry(entry); entry.ViewItem.Remove(); } }
public static void ShowFileProperties(FileEntry entry) { if (entry.IsRegularFile()) { new RegularFileProperties(entry as RegularFileEntry).ShowDialog(); } else if (entry.IsResource()) { new ResourceProperties(entry as ResourceEntry).ShowDialog(); } entry.ViewItem.Update(); }
public static void ExportFile(FileEntry entry) { string selectedFilename; if (entry is ResourceEntry) { selectedFilename = GUI.FolderSelection(); } else { selectedFilename = GUI.FileSaveSelection(entry.Name); } if (selectedFilename != null) { entry.Export(selectedFilename); } }
public static void SelectAll(FileEntry entry) { SelectAll(entry.Parent); }
public static void ForceDeleteFile(FileEntry entry) { DeleteFile(entry); }
public static void AskDeleteFile(FileEntry entry) { DeleteFile(entry, false); }
public static void RenameFile(FileEntry entry) { entry.ViewItem.ListView.LabelEdit = true; entry.ViewItem.BeginEdit(); }