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.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace Assignment_1._0
- {
- public partial class Form1 : Form
- {
- int credits = 0;
- bool playing = false;
- public Form1()
- {
- InitializeComponent();
- buttonPlay.Visible = false;
- if (credits > 0)
- {
- buttonPlay.Visible = true;
- }
- }
- private void button6_Click(object sender, EventArgs e)
- {
- credits += 5;
- lblCredits.Text = Convert.ToString(credits);
- }
- private void lblCredits_Click(object sender, EventArgs e)
- {
- }
- private void buttonPlay_Click(object sender, EventArgs e)
- {
- playing = true;
- if (credits <= 0)
- {
- playing = false;
- }
- }
- private void buttonTest_Click(object sender, EventArgs e)
- {
- credits -= 1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement