private void showDropListView(weaponDbForm.dropListType type)
        {
            Point location = this.pnlDropList.Location;

            this.disableAllDropListButtons();
            this.selectedDropList = type;
            this.dropListView.Items.Clear();
            switch (this.selectedDropList)
            {
            case weaponDbForm.dropListType.weapon_type:
                for (int index = 1; index < 29; ++index)
                {
                    this.dropListView.Items.Add(new ListViewItem(this.parent.weaponEnumToName((pspo2seForm.weaponType)index), index - 1)
                    {
                        SubItems =
                        {
                            string.Concat((object)index)
                        }
                    });
                }
                location.X = 6;
                location.Y = 45;
                this.dropListView.SmallImageList = this.weaponTypesImageList;
                break;

            case weaponDbForm.dropListType.manufacturer:
                for (int imageIndex = 0; imageIndex < 4; ++imageIndex)
                {
                    this.dropListView.Items.Add(new ListViewItem(this.parent.enumToName(string.Concat((object)(pspo2seForm.weaponManufacturerType)imageIndex)), imageIndex)
                    {
                        SubItems =
                        {
                            string.Concat((object)imageIndex)
                        }
                    });
                }
                location.X = 6;
                location.Y = 73;
                this.dropListView.SmallImageList = this.manufacturerImageList;
                break;

            case weaponDbForm.dropListType.weapon:
                if (this.txtWeaponType.Text == "")
                {
                    int num = (int)MessageBox.Show("You must select a weapon type first");
                    return;
                }
                location.X = 6;
                location.Y = 101;
                this.loadSelectedWeaponNamesView();
                this.dropListView.SmallImageList = this.rankImageList;
                break;

            default:
                this.enableAllDropListButtons();
                return;
            }
            this.pnlDropList.Location = location;
            this.pnlDropList.Visible  = true;
        }
 private void weaponDbForm_Click(object sender, EventArgs e)
 {
     if (this.selectedDropList == weaponDbForm.dropListType.none)
     {
         return;
     }
     this.pnlDropList.Visible = false;
     this.enableAllDropListButtons();
     this.selectedDropList = weaponDbForm.dropListType.none;
 }
 public void initForm()
 {
     this.selectedDropList = weaponDbForm.dropListType.none;
     this.enableAllDropListButtons();
     this.clearAllFields();
     this.parent = Program.form;
     this.pnlDropList.Visible = false;
     this.loadDbWeaponLinks();
     if (!Program.form.legitVersion())
     {
         return;
     }
     this.btnExport.Visible = false;
 }
        private void closeDropListView()
        {
            this.pnlDropList.Visible    = false;
            this.pnlItemDetails.Visible = false;
            Application.DoEvents();
            switch (this.selectedDropList)
            {
            case weaponDbForm.dropListType.weapon_type:
                this.txtWeaponType.Text            = this.dropListView.SelectedItems[0].Text;
                this.txtSelectedWeaponType.Text    = int.Parse(this.dropListView.SelectedItems[0].SubItems[1].Text).ToString("X2");
                this.imgDropListWeaponType.Image   = this.parent.getWeaponImageFromType((pspo2seForm.weaponType) int.Parse(this.dropListView.SelectedItems[0].SubItems[1].Text));
                this.imgDropListWeaponType.Visible = true;
                this.updateHex(2, this.txtSelectedWeaponType.Text);
                this.loadFirstWeaponInSelection();
                this.txtManufacturer.Text            = "Select Manufacturer";
                this.txtSelectedManufacturer.Text    = "";
                this.imgDropListManufacturer.Visible = false;
                break;

            case weaponDbForm.dropListType.manufacturer:
                this.txtManufacturer.Text            = this.dropListView.SelectedItems[0].Text;
                this.txtSelectedManufacturer.Text    = int.Parse(this.dropListView.SelectedItems[0].SubItems[1].Text).ToString("X2");
                this.imgDropListManufacturer.Image   = this.parent.getWeaponManufacturerImage((pspo2seForm.weaponManufacturerType) int.Parse(this.dropListView.SelectedItems[0].SubItems[1].Text));
                this.imgDropListManufacturer.Visible = true;
                this.updateHex(6, this.txtSelectedManufacturer.Text);
                this.loadFirstWeaponInSelection();
                break;

            case weaponDbForm.dropListType.weapon:
                this.txtWeapon.Text         = this.dropListView.SelectedItems[0].Text;
                this.txtSelectedWeapon.Text = this.dropListView.SelectedItems[0].SubItems[2].Text;
                if (this.dbLink[int.Parse(this.txtSelectedWeapon.Text)].rarity < 0)
                {
                    this.imgDropListWeapon.Image = (Image)Resources.rank_Unknown;
                }
                else
                {
                    switch (this.parent.getItemRankFromRarity(this.dbLink[int.Parse(this.txtSelectedWeapon.Text)].rarity))
                    {
                    case pspo2seForm.itemRankType.c:
                        this.imgDropListWeapon.Image = (Image)Resources.rank_C;
                        break;

                    case pspo2seForm.itemRankType.b:
                        this.imgDropListWeapon.Image = (Image)Resources.rank_B;
                        break;

                    case pspo2seForm.itemRankType.a:
                        this.imgDropListWeapon.Image = (Image)Resources.rank_A;
                        break;

                    case pspo2seForm.itemRankType.s:
                        this.imgDropListWeapon.Image = (Image)Resources.rank_S;
                        break;
                    }
                }
                this.imgDropListWeapon.Visible = true;
                break;
            }
            this.selectedDropList = weaponDbForm.dropListType.none;
            this.enableAllDropListButtons();
            this.showSelectedWeapon();
        }