private void Pack(string inFile, string inIdx, string outFile, FileType type, int typeIndex)
        {
            try
            {
                statustext.Text = inFile;
                Refresh();
                inFile = FixPath(inFile);

                if (!File.Exists(inFile))
                {
                    return;
                }

                outFile = FixPath(outFile);

                if (File.Exists(outFile))
                {
                    return;
                }

                inIdx = FixPath(inIdx);
                ++_total;

                LegacyMulFileConverter.ToUOP(inFile, inIdx, outFile, type, typeIndex);

                ++_success;
            }
            catch (Exception e)
            {
                MessageBox.Show($"An error occured while performing the action.\r\n{e.Message}");
            }
        }
        private void Touop(object sender, EventArgs e)
        {
            if (inmul.Text?.Length == 0 || inmul.Text == null)
            {
                MessageBox.Show("You must specify the input mul");
                return;
            }

            if (inidx.Text?.Length == 0 || inidx.Text == null)
            {
                MessageBox.Show("You must specify the input idx");
                return;
            }

            if (outuop.Text?.Length == 0 || outuop.Text == null)
            {
                MessageBox.Show("You must specify the output uop");
                return;
            }

            if (!File.Exists(inmul.Text))
            {
                MessageBox.Show("The input mul does not exists");
                return;
            }

            if (!File.Exists(inidx.Text))
            {
                MessageBox.Show("The input idx does not exists");
                return;
            }

            if (File.Exists(outuop.Text))
            {
                MessageBox.Show("output file already exists");
                return;
            }

            try
            {
                multouop.Text    = "Converting...";
                multouop.Enabled = false;

                Enum.TryParse(multype.SelectedValue.ToString(), out FileType status);
                LegacyMulFileConverter.ToUOP(inmul.Text, inidx.Text, outuop.Text, status, (int)mulmaptype.Value);
            }
            catch
            {
                MessageBox.Show("An error occurred");
            }
            finally
            {
                multouop.Text    = "Convert";
                multouop.Enabled = true;
            }
        }
        private UopPackerControl()
        {
            InitializeComponent();

            _conv = new LegacyMulFileConverter();

            multype.DataSource  = uoptype.DataSource = Enum.GetValues(typeof(FileType));
            mulmaptype.ReadOnly = uopmaptype.ReadOnly = true;

            Dock = DockStyle.Fill;
        }