Ejemplo n.º 1
0
        private void replaceBinaryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count != 1)
            {
                return;
            }
            if (MessageBox.Show("Are you sure you want to delete this?", "WARNING", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                return;
            }
            FATXFileEntry x      = ((FATXFileEntry)listView1.SelectedItems[0].Tag);
            string        locale = VariousFunctions.GetUserFileLocale("Save to where?", "", false);

            if (locale == null)
            {
                return;
            }
            listView1.Enabled = false;
            status            = "Replacing File";
            if (x.Replace(locale))
            {
                refresh();
            }
            status            = "Idle";
            listView1.Enabled = true;
        }
Ejemplo n.º 2
0
        private void replaceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FATXFileEntry x      = ((FATXFileEntry)listView1.SelectedItems[0].Tag);
            string        filter = VariousFunctions.GetFilter(x.Name);

            if (filter != "")
            {
                filter += "|All|*.*";
            }
            string y = VariousFunctions.GetUserFileLocale("Open a file", filter, x.Name, true);

            if (y == null)
            {
                return;
            }
            advTree1.Enabled = listView1.Enabled = menuStrip1.Enabled = false;
            x.Replace(y);
            advTree1.Enabled = listView1.Enabled = menuStrip1.Enabled = true;
        }