using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form9 : Form
{
public static int aa;
public static int bb;
private System.Windows.Forms.PictureBox[,] t;
public Form9()
{
InitializeComponent();
}
private void Form9_Load(object sender, EventArgs e)
{
t = new PictureBox[3, 3]{
{pictureBox1 ,pictureBox2 ,pictureBox3 },
{pictureBox4 ,pictureBox5 ,pictureBox6 },
{pictureBox7 ,pictureBox8 ,pictureBox9 }
};
for (int i = 0; i <= 2; i++)
{
for (int j = 0; j <= 2; j++)
{
t[i, j].Enabled = false;
}
}
}
private void pictureBox1_Click(object sender, EventArgs e)
{
bb++;
label2.Text = bb.ToString();
if (pictureBox2.Image == null)
{
pictureBox2.Image = pictureBox1.Image;
pictureBox1.Image = null;
}
else if (pictureBox4.Image == null)
{
pictureBox4.Image = pictureBox1.Image;
pictureBox1.Image = null;
}
}
private void pictureBox2_Click(object sender, EventArgs e)
{
bb++;
label2.Text = bb.ToString();
if (pictureBox1.Image == null)
{
pictureBox1.Image = pictureBox2.Image;
pictureBox2.Image = null;
}
else if (pictureBox3.Image == null)
{
pictureBox3.Image = pictureBox2.Image;
pictureBox2.Image = null;
}
else if (pictureBox5.Image == null)
{
pictureBox5.Image = pictureBox2.Image;
pictureBox2.Image = null;
}
}
private void pictureBox3_Click(object sender, EventArgs e)
{
bb++;
label2.Text = bb.ToString();
if (pictureBox2.Image == null)
{
pictureBox2.Image = pictureBox3.Image;
pictureBox3.Image = null;
}
else if (pictureBox6.Image == nu