private void pictureBox1_MouseMove(object sender, MouseEventArgs e)//тоже рисуем или чистим { switch (e.Button) { case System.Windows.Forms.MouseButtons.Left: grFront.FillRectangle(Brushes.Black, (float)(e.X / 25.6), (float)(e.Y / 25.6), (float)1, (float)1); symbPic.SetAtXY((int)(e.X / 25.6), (int)(e.Y / 25.6)); //добавляем точку к модели вх. данных pictureBox1.Image = btmFront; pictureBox1.BackgroundImage = btmBack; pictureBox1.Refresh(); break; case System.Windows.Forms.MouseButtons.Right: grFront.FillRectangle(Brushes.White, (float)(e.X / 25.6), (float)(e.Y / 25.6), (float)1, (float)1); symbPic.ClearAtXY((int)(e.X / 25.6), (int)(e.Y / 25.6)); //убираем точку pictureBox1.Image = btmFront; pictureBox1.BackgroundImage = btmBack; pictureBox1.Refresh(); break; } if (symbPic.canIndicate)//вводим в сеть, и отображаем, что получилось... { net.SetInputData(symbPic.ReturnXs()); bool[] res = net.CalcResult(); listBox1.Items.Clear(); for (int i = 0; i < res.Length; i++) { if (res[i]) { listBox1.Items.Add((Alphabet)i); } } } }