Exemple #1
0
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string cardlist = listBox1.SelectedItem.ToString();
            string card     = UpdatePic.UpPic(cardlist);

            pictureBox1.Image    = Image.FromFile(@"..\..\CardPics\JPEG\" + card + ".jpg");
            pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
        }
Exemple #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            Random rnd      = new Random();
            var    cardlist = listBox1.Items.Cast <String>().ToList();
            string card     = cardlist[rnd.Next(cardlist.Count)];


            card = UpdatePic.UpPic(card);
            pictureBox1.Image    = Image.FromFile(@"..\..\CardPics\JPEG\" + card + ".jpg");
            pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
        }