Beispiel #1
0
 public EntryListViewItem(FileEntry entry)
     : base(entry.Name)
 {
     this.Entry = entry;
     this.Entry.ViewItem = this;
     Update();
 }
Beispiel #2
0
 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();
     }
 }
Beispiel #3
0
 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();
 }
Beispiel #4
0
 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);
     }
 }
Beispiel #5
0
 public static void SelectAll(FileEntry entry)
 {
     SelectAll(entry.Parent);
 }
Beispiel #6
0
 public static void ForceDeleteFile(FileEntry entry)
 {
     DeleteFile(entry);
 }
Beispiel #7
0
 public static void AskDeleteFile(FileEntry entry)
 {
     DeleteFile(entry, false);
 }
Beispiel #8
0
 public static void RenameFile(FileEntry entry)
 {
     entry.ViewItem.ListView.LabelEdit = true;
     entry.ViewItem.BeginEdit();
 }