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 WindowsFormsApp2
- {
- public partial class FormMain : Form
- {
- public FormMain()
- {
- Budynek Tartak = new Budynek();
- Tartak.Nazwa = labelNazwaTartak.Text;
- Tartak.Poziom = int.Parse(labelPoziomTartak.Text);
- Tartak.Zloto = int.Parse(labelIleZlotoTartak.Text);
- InitializeComponent();
- #region buttonyUlepszanieBudynków
- Budynek UlepszTartak()
- {
- Tartak.Poziom = Tartak.Poziom + 1;
- Tartak.Zloto = Tartak.Zloto * 5;
- labelPoziomTartak.Text = Tartak.Poziom.ToString();
- labelIleZlotoTartak.Text = Tartak.Zloto.ToString();
- return Tartak;
- }
- #endregion
- }
- void buttonUlepszTartak_Click(object sender, EventArgs e)
- {
- Tartak = UlepszTartak();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement