private void extract_button_Click(object sender, EventArgs e)
        {
            isRecursive  = recursive_radio_.Checked;
            isOverrideOn = override_tags_.Checked;
            isOutDBOn    = output_db_.Checked;

            DestinationFolder = textBox1.Text;
            MapsFolder        = MainBox.map_path;

            string mapName   = DATA_READ.Read_File_from_file_location(MainBox.map_name);
            int    TotalTags = TagsList.Count;

            curent_tag_status.Visible = true;


            if (DestinationFolder == "")
            {
                curent_tag_status.Text = "Select a Destination Folder Please";
                return;
            }

            if (MapsFolder == "")
            {
                curent_tag_status.Text = "Select a Maps Folder Please";
                return;
            }



            curent_tag_status.Text = "Initializing Decompiler";


            MainBox.CloseMap();
            progressBar1.Value   = 0;
            progressBar1.Maximum = TotalTags;
            int index = 0;

            foreach (int i in TagsList.Keys)
            {
                tag_count_stats.Text   = "[" + index + "/" + TotalTags + "]";
                curent_tag_status.Text = "Extracting Objects : " + TagsList.Values.ElementAt(index);
                MainBox.H2Test.Halo2_ExtractTagCache(i, isRecursive, isOutDBOn, isOverrideOn, DestinationFolder, MapsFolder, mapName);
                progressBar1.Value++;     //update the progress bar
                index++;
            }

            if (MessageBox.Show("Extraction Done!", "Progress", MessageBoxButtons.OK) == DialogResult.OK)
            {
                MainBox.ReOpenMap();
            }
        }
Ejemplo n.º 2
0
        private void extract_button_Click(object sender, EventArgs e)
        {
            isRecursive  = recursive_radio_.Checked;
            isOverrideOn = override_tags_.Checked;
            isOutDBOn    = output_db_.Checked;


            DestinationFolder = textBox3.Text;


            string mapName   = DATA_READ.Read_File_from_file_location(MainBox.map_name);
            int    TotalTags = AddList.Count;

            current_tag_status.Visible = true;


            if (DestinationFolder == "")
            {
                current_tag_status.Text = "Select a Destination Folder Please";
                return;
            }



            current_tag_status.Text = "Initializing Decompiler";


            MainBox.CloseMap();
            progressBar1.Value   = 0;
            progressBar1.Maximum = ExtractList.Count;
            int index = 0;

            foreach (int i in ExtractList.Keys)
            {
                current_tag_status.Text = "Extracting Objects : " + ExtractList.Values.ElementAt(index);
                MainBox.H2Test.Halo2_ExtractTagCache(i, isRecursive, isOutDBOn, isOverrideOn, DestinationFolder, H2V_BaseMapsDirectory + "\\", mapName);
                progressBar1.Value++; //update the progress bar
                index++;
            }

            current_tag_status.Text = "Extraction Complete!";
            if (MessageBox.Show("Extraction Done!", "Progress", MessageBoxButtons.OK) == DialogResult.OK)
            {
                MainBox.ReOpenMap();
            }
            clear_button.Enabled   = false;
            extract_button.Enabled = false;
            ExtractList.Clear();
            richTextBox1.Text = "";
        }