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(); } }
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); } }
private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e) { StaticMain.FormClosed(this); }
private void ItemForm_FormClosing(object sender, System.ComponentModel.CancelEventArgs e) { //if (parent is AfterWinForm) ((AfterWinForm)parent).RefreshBalance(); StaticMain.FormClosed(this); }