Пример #1
0
		public void Draw( int x, int y, Board board)
		{
			Graphics g=board.Grap ;
			int w =board.Width/20;
			int x0,y0,r;
			x0= x*w-w/2;
			y0= y*w-w/2;
			r=w/2+w/2;
			
			Brush b = new SolidBrush(color);
			g.FillEllipse(b,x0,y0,r,r);
						
		}
Пример #2
0
		private void Form1_Load(object sender, System.EventArgs e)
		{
			if (this.panel1.Width>this.panel1.Height)
				this.panel1.Width=this.panel1.Height;
			else
				this.panel1.Height=this.panel1.Width;
			Graphics g = this.panel1.CreateGraphics();
			b = new Board(g);
			b.Width=this.panel1.Width ;
			b.Draw();
		}