Exemple #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();
            }
        }
Exemple #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);
            }
        }