コード例 #1
0
        private void btnPetInfo_Click(object sender, EventArgs e)
        {
            //           BattlePet temp = new BattlePet((string)(dgvPartySlots.SelectedRows[0].Cells[1].Value), (int)dgvPartySlots.SelectedRows[0].Cells[18].Value, dgvPartySlots.SelectedRows[0].Cells[3].Value, dgvPartySlots.SelectedRows[0].Cells[19].Value, dgvPartySlots.SelectedRows[0].Cells[0].Value, dgvPartySlots.SelectedRows[0].Cells[2].Value, dgvPartySlots.SelectedRows[0].Cells[4].Value, dgvPartySlots.SelectedRows[0].Cells[5].Value, dgvPartySlots.SelectedRows[0].Cells[6].Value, dgvPartySlots.SelectedRows[0].Cells[7].Value, dgvPartySlots.SelectedRows[0].Cells[8].Value, dgvPartySlots.SelectedRows[0].Cells[16].Value, BattlePet.BattlePetType enum Critter);
            PetInfo   info = new PetInfo();       //create a new PetInfo instance
            BattlePet p    = (BattlePet)info.Tag; // using the instance to tag to the petinfo frm

            info.ShowDialog(this);
        }
コード例 #2
0
        private void petInfoToolStripMenuItem_Click(object sender, EventArgs e) //user selects the "Pet Info" section in the dropdown menu
        {
            PetInfo info = new PetInfo();                                       //create a new PetInfo instance

            info.ShowDialog(this);                                              //launch new PetInfo instance
        }