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