Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace gameKappa
- {
- public partial class Form1 : Form
- {
- int timesFailed = 0;
- const string word = "word";
- public Form1()
- {
- InitializeComponent();
- pictureBox1.Image = Image.FromFile(@"C:\\Users\\Cynn\\Desktop\\Pics\\1.gif");
- }
- private void button1_Click(object sender, EventArgs e)
- {
- if (word.Contains(textBox1.Text))
- {
- label4.Text = "Correct";
- }else
- {
- timesFailed += 1;
- label2.Text = timesFailed.ToString();
- switch(timesFailed)
- {
- case 1:
- pictureBox1.Image = Image.FromFile(@"C:\\Users\\Cynn\\Desktop\\Pics\\2.gif");
- break;
- case 2:
- pictureBox1.Image = Image.FromFile(@"C:\\Users\\Cynn\\Desktop\\Pics\\3.gif");
- break;
- case 3:
- pictureBox1.Image = Image.FromFile(@"C:\\Users\\Cynn\\Desktop\\Pics\\4.gif");
- break;
- case 4:
- pictureBox1.Image = Image.FromFile(@"C:\\Users\\Cynn\\Desktop\\Pics\\5.gif");
- break;
- case 5:
- pictureBox1.Image = Image.FromFile(@"C:\\Users\\Cynn\\Desktop\\Pics\\6.gif");
- break;
- case 6:
- pictureBox1.Image = Image.FromFile(@"C:\\Users\\Cynn\\Desktop\\Pics\\7.gif");
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement