예제 #1
0
 private void extractToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (listView1.SelectedItems.Count == 1)
     {
         FATXFileEntry x = ((FATXFileEntry)listView1.SelectedItems[0].Tag);
         string        y = VariousFunctions.GetUserFileLocale("Save to where?", VariousFunctions.GetFilter(x.Name), x.Name, false);
         if (y == null)
         {
             return;
         }
         advTree1.Enabled = listView1.Enabled = menuStrip1.Enabled = false;
         x.Extract(y);
     }
     else
     {
         string y = VariousFunctions.GetUserFolderLocale("Save to where?");
         if (y == null)
         {
             return;
         }
         advTree1.Enabled = listView1.Enabled = menuStrip1.Enabled = false;
         foreach (ListViewItem z in listView1.SelectedItems)
         {
             FATXFileEntry x = ((FATXFileEntry)z.Tag);
             x.Extract(y + "/" + x.Name);
         }
     }
     advTree1.Enabled = listView1.Enabled = menuStrip1.Enabled = true;
 }
예제 #2
0
        void xWatch_Created(object sender, FileSystemEventArgs e)
        {
            string droppath = Directory.GetParent(e.FullPath).FullName;

            temp = null;
            menuStrip1.Enabled = menuStrip2.Enabled = listView1.Enabled = false;
            status             = "Extracting items";
            foreach (ListViewItem y in listView1.SelectedItems)
            {
                switch (y.ImageIndex)
                {
                case 1:
                {
                    FATXFolderEntry ent = (FATXFolderEntry)y.Tag;
                    ent.Extract(droppath, true);
                    break;
                }

                case 2:
                {
                    FATXFileEntry ent   = ((FATXFileEntry)y.Tag);
                    string        xfile = droppath + "/" + ent.Name;
                    ent.Extract(xfile);
                    break;
                }

                default: break;
                }
            }
            VariousFunctions.DeleteFile(e.FullPath);
            status             = "Idle";
            isitem             = false;
            menuStrip1.Enabled = menuStrip2.Enabled = listView1.Enabled = true;
        }
예제 #3
0
        private void extractToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count != 1)
            {
                return;
            }
            FATXFileEntry x      = ((FATXFileEntry)listView1.SelectedItems[0].Tag);
            string        locale = VariousFunctions.GetUserFileLocale("Save to where?", "", false);

            if (locale == null)
            {
                return;
            }
            listView1.Enabled = false;
            status            = "Injecting File";
            if (x.Extract(locale))
            {
                refresh();
            }
            status            = "Idle";
            listView1.Enabled = true;
        }