Beispiel #1
0
 private void ClearForm()
 {
     flowLayoutPanel1.Controls.Clear();
     currentlySelectedCard = null;
     splitContainerCardDetails.Panel1.Controls.Clear();
     splitContainerCardDetails.Panel2.Controls.Clear();
     currentlyDisplayedPokemon.Clear();
 }
Beispiel #2
0
 private void pictureBox_Click(object sender, EventArgs e)
 {
     CardDownloader cd = new CardDownloader();
     int index = flowLayoutPanel1.Controls.IndexOf((Control)sender);
     flowLayoutPanel1.Controls.Clear();
     PictureBox newCardImage = new PictureBox();
     newCardImage.Image = Image.FromFile(currentlyDisplayedPokemon[index].Item2);
     newCardImage.SizeMode = PictureBoxSizeMode.AutoSize;
     splitContainerCardDetails.Panel1.Controls.Add(newCardImage);
     PokemonCard singleCard = cd.GetPokemonCardInfoFromWebsite(currentlyDisplayedPokemon[index].Item1, currentlyDisplayedPokemon[index].Item2);
     TextBox newCardDetails = MakeDetailsBox(singleCard);
     splitContainerCardDetails.Panel2.Controls.Add(newCardDetails);
     currentlySelectedCard = singleCard;            
     panelMyCards.Hide();
     CardSearchPanel.Hide();
     cardDetailsPanel.Show();        
     return;
 }