Пример #1
0
 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();
     }
 }
Пример #2
0
 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();
     }
 }
Пример #3
0
 public void ShowWonDialog(Counter counter)
 {
     new FormWon(this, counter).ShowDialog();
 }