public void MyLine() { Font drawFont = new Font("Arial", 16); SolidBrush drawBrush = new SolidBrush(Color.Gold); SolidBrush grayB = new SolidBrush(Color.Gray); SolidBrush whiteB = new SolidBrush(Color.White); Graphics g = this.CreateGraphics(); for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { Rectangle q = new Rectangle(73 * j + 7, 73 * i + 25, 72, 72); PointF drawpoint = new PointF(73 * j + 7 + 25, 73 * i + 25 + 25); int mass = Convert.ToInt32((Math.Pow(4, 0) * (j % 4)) + (Math.Pow(4, 1) * (i % 4))); string cheks = Convert.ToString(Memo.GetNumber(mass)); if (cheks == "0") { cheks = ""; g.FillRectangle(whiteB, q); } else { g.DrawRectangle(new Pen(Color.Black), q); g.FillRectangle(grayB, q); g.DrawString(cheks, drawFont, drawBrush, drawpoint); } } } }
static public void KeyRight(int index) { int temp = Memo.GetNumber(index + 1); Memo.SetNumber(index + 1, Memo.GetNumber(index)); Memo.SetNumber(index, temp); Memo.IntTurns(); }
static public void KeyDown(int index) { int temp = Memo.GetNumber(index + 4); Memo.SetNumber(index + 4, Memo.GetNumber(index)); Memo.SetNumber(index, temp); Memo.IntTurns(); }