private void PictureBox_Click(object sender, EventArgs e)
        {
            PCPictureBox pictureClicked = sender as PCPictureBox;

            if (pictureClicked.PictureType == PictureTypeEnum.GreenBox || pictureClicked.PictureType == PictureTypeEnum.RedBox)
            {
                if (selectedPicture != null)
                {
                    PCPictureBox.UnselectTool(selectedPicture, SQUARE_SIDE_SIZE);
                }

                selectedPicture      = pictureClicked;
                selectedPicture.Left = INITIAL_POSITION + SQUARE_SIDE_SIZE * selectedPicture.PictureColumn;
                selectedPicture.Top  = INITIAL_POSITION + SQUARE_SIDE_SIZE * selectedPicture.PictureRow;

                PCPictureBox.SelectTool(selectedPicture, SQUARE_SIDE_SIZE);
            }
        }
Example #2
0
 private void pbxGreenBox_Click(object sender, EventArgs e)
 {
     chosenPictureType = PictureTypeEnum.GreenBox;
     UnselectAllTools();
     PCPictureBox.SelectTool(pbxGreenBox, SELECTED_SQUARE_SIDE_SIZE);
 }