private void lvEntries_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lvEntries.SelectedItems == null || lvEntries.SelectedItems.Count <= 0)
            {
                ClearSelected();
                return;
            }
            SelectedEntry = lvEntries.SelectedItems[0];
            PackageDataBase.DataBaseEntry entry = (PackageDataBase.DataBaseEntry)SelectedEntry.Tag;
            txtID.Text    = ((uint)entry.ID).ToString("X2");
            txtSize.Text  = entry.Size.ToString();
            txtSize2.Text = entry.Size2.ToString();

            txtData.Text = entry.DataString;
            tips.RemoveAll();
            try
            {
                tips.SetToolTip(txtData, Encoding.ASCII.GetString(entry.Data).Trim('\0'));
            }
            catch
            {
                tips.SetToolTip(txtData, "Invalid ASCII!");
            }
            cmdSave.Enabled = true;
        }
        private void cmdSave_Click(object sender, EventArgs e)
        {
            if (SelectedEntry == null)
            {
                ClearSelected();
                return;
            }
            PackageDataBase.DataBaseEntry entry = (PackageDataBase.DataBaseEntry)SelectedEntry.Tag;
            entry.ID    = (PackageDataBase.EntryID)UInt32.Parse(txtID.Text, NumberStyles.HexNumber);
            entry.Data  = Program.HexStringToBytes(txtData.Text);
            entry.Size  = UInt32.Parse(txtSize.Text);
            entry.Size2 = UInt32.Parse(txtSize2.Text);
            string name = "0x" + ((uint)entry.ID).ToString("X2");

            if (Enum.GetNames(typeof(PackageDataBase.EntryID)).Contains(entry.ID.ToString()))
            {
                name = entry.ID.ToString();
            }
            SelectedEntry.Text             = name;
            SelectedEntry.SubItems[1].Text = entry.Size.ToString();
            SelectedEntry.SubItems[2].Text = entry.Size2.ToString();
            SelectedEntry.SubItems[3].Text = entry.DataString;
        }