public Grid(Form1 form, int size, bool showUpwards) { this.form = form; this.counter = new Counter(); this.showUpwards = showUpwards; if (size == Grid.SMALL) { this.size = Grid.SMALL; form.Size = new Size(400, 400); cardsList = new List<Card>(); cards = new Card[4,4]; } else if (size == Grid.LARGE) { this.size = Grid.LARGE; form.Size = new Size(650, 650); cardsList = new List<Card>(); cards = new Card[8, 8]; } LoadBitmaps(); InitCards(); if (showUpwards) { ShowAll(); } }
public FormWon(Form1 parentForm, Counter counter) { InitializeComponent(); this.parentForm = parentForm; labelSuccessfulTurns.Text = counter.NumberOfSuccessfulTurns.ToString(); labelTurns.Text = counter.NumberOfTurns.ToString(); this.counter = counter; turns = counter.Turns; for (int i = 0; i < turns.Count; i++) { textBoxTurns.Text += turns[i].ToString(); } }
public void ShowWonDialog(Counter counter) { new FormWon(this, counter).ShowDialog(); }