예제 #1
0
        private void ShowItemForm()
        {
            ItemForm playerEquipmentForm = new ItemForm(_equipment, _playerParty, this);

            if (!StaticMain.openedForms.Where(x => x.Name == playerEquipmentForm.Name).Any())
            {
                StaticMain.FormOpened(playerEquipmentForm);
                playerEquipmentForm.Location = new Point(this.Location.X + this.Size.Width, this.Location.Y);
                playerEquipmentForm.BringToFront();
                playerEquipmentForm.Show();
            }
        }
예제 #2
0
        private void ShowDetails(IPokemon pokemon)
        {
            _parentForm = (PokemonPartyForm)Parent;
            PokemonDetailsForm pokemonDetailsForm = new PokemonDetailsForm(pokemon);

            if (!StaticMain.openedForms.Where(x => x.Name == pokemonDetailsForm.Name).Any())
            {
                pokemonDetailsForm.Show();
                pokemonDetailsForm.Location = new Point(_parentForm.Location.X + _parentForm.Width, _parentForm.Location.Y);
                StaticMain.FormOpened(pokemonDetailsForm);
            }
            else
            {
                pokemonDetailsForm = StaticMain.openedForms.Where(x => x.Name == pokemonDetailsForm.Name).First() as PokemonDetailsForm;
                pokemonDetailsForm.UpdateData(pokemon);
            }
        }
예제 #3
0
 private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     StaticMain.FormClosed(this);
 }
예제 #4
0
        private void ItemForm_FormClosing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            //if (parent is AfterWinForm) ((AfterWinForm)parent).RefreshBalance();

            StaticMain.FormClosed(this);
        }