예제 #1
0
        public void DrawRectangle(int i, int j)
        {
            UCRectangle uCRectangle = new UCRectangle()
            {
                Width = sizeOfRectangle, Height = sizeOfRectangle
            };

            listUCRectangle[i, j] = uCRectangle;
            wpnlBoard.Children.Add(uCRectangle);
        }
예제 #2
0
        public void DrawNumber(int i, int j, bool isRow)
        {
            UCRectangle uCRectangle = new UCRectangle()
            {
                Width = sizeOfRectangle, Height = sizeOfRectangle
            };

            if (isRow)
            {
                uCRectangle.txbChessman.Text          = (j - 1).ToString();
                uCRectangle.recBorder.StrokeThickness = 0;
                wpnlRow.Children.Add(uCRectangle);
            }
            else
            {
                uCRectangle.txbChessman.Text          = (i - 1).ToString();
                uCRectangle.recBorder.StrokeThickness = 0;
                wpnlCol.Children.Add(uCRectangle);
            }
        }