Esempio n. 1
0
 public frmEditKanji(Image baseImage = null)
 {
     InitializeComponent();
     widthCirclePointer = WidthCirclePointer.Small;
     typePointer = TypePointer.Circle;
     selectedPencilBox = picBoxCircleSmall;
     colorFront = Color.Black;
     colorBack = Color.White;
     toolStripLabel_dimension.Text = "-";
     if (baseImage != null)
         this.Set(ImageAPI.AlltoBMP(baseImage));
 }
Esempio n. 2
0
        /// <summary>
        /// Set the width and type to pointer
        /// </summary>
        /// <param name="picBox"></param>
        private void clickPictureBox(PictureBox picBox)
        {
            //Hace visible la seleccion
            if (selectedPencilBox != picBox)
            {
                selectedPencilBox.BorderStyle = BorderStyle.None;
                picBox.BorderStyle = BorderStyle.Fixed3D;
                selectedPencilBox = picBox;
            }

            //Establece el ancho y forma
            string name = picBox.Name;
            switch (name)
            {
                case "picBoxCircleBig":
                    widthCirclePointer = WidthCirclePointer.Big;
                    typePointer = TypePointer.Circle;
                    break;
                case "picBoxCircleMedium":
                    widthCirclePointer = WidthCirclePointer.Medium;
                    typePointer = TypePointer.Circle;
                    break;
                case "picBoxCircleSmall":
                    widthCirclePointer = WidthCirclePointer.Small;
                    typePointer = TypePointer.Circle;
                    break;
                case "picBoxRecBig":
                    widthRectanglePointer = WidthRectanglePointer.Big;
                    typePointer = TypePointer.Rectangle;
                    break;
                case "picBoxRecMedium":
                    widthRectanglePointer = WidthRectanglePointer.Medium;
                    typePointer = TypePointer.Rectangle;
                    break;
                case "picBoxRecSmall":
                    widthRectanglePointer = WidthRectanglePointer.Small;
                    typePointer = TypePointer.Rectangle;
                    break;
            }
        }