This commit is contained in:
2022-11-15 14:22:17 -06:00
parent c2062a2a38
commit ab09a46923
268 changed files with 1961 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
namespace lab6_2_CalebFontenot
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void exitButton_Click(object sender, EventArgs e)
{
this.Close();
}
private void showCardButton_Click(object sender, EventArgs e)
{
// If a card is selected in the List Box, display it.
if (cardListBox.SelectedIndex != -1)
{
showCard(cardListBox.SelectedItem.ToString());
}
}
private void showCard (string card)
{
switch (card)
{
case "Ace of Spades":
playingCardPictureBox.Image = Properties.Resources.Ace_Spades;
break;
case "10 of Hearts":
playingCardPictureBox.Image = Properties.Resources._10_Hearts;
break;
case "King of Clubs":
playingCardPictureBox.Image = Properties.Resources.King_Clubs;
break;
}
}
}
}