public override (bool canBeDone, OutLinkButton, InLinkButton) StartLink(int xMouse, int yMouse)
 {
     if (OutLinkLeft.LinkedTo == null && OutLinkLeft.IsUnderMouse(xMouse, yMouse))
     {
         return(true, OutLinkLeft, InLink);
     }
     if (OutLinkRight.LinkedTo == null && OutLinkRight.IsUnderMouse(xMouse, yMouse))
     {
         return(true, OutLinkRight, InLink);
     }
     return(false, null, null);
 }
        private void ImageDrawing(Bitmap srcBitmap, PictureBox srcPictureBox, bool isDashed)
        {
            if (InLink.LinkedTo != null)
            {
                InLink.ClearLinkButton(srcBitmap, srcPictureBox);
            }

            if (OutLinkLeft.LinkedTo != null)
            {
                OutLinkLeft.ClearLinkButton(srcBitmap, srcPictureBox);
            }

            if (OutLinkRight.LinkedTo != null)
            {
                OutLinkRight.ClearLinkButton(srcBitmap, srcPictureBox);
            }

            Graphics graphics = Graphics.FromImage(srcBitmap);

            graphics.FillPolygon(Brushes.White, this.GetPointsArray());
            Pen pen = new Pen(Color.Black, 2);

            pen.Alignment = PenAlignment.Inset;
            if (isDashed)
            {
                float[] dashValues = { 5, 5 };
                pen.DashPattern = dashValues;
            }
            graphics.DrawPolygon(pen, this.GetPointsArray());
            StringFormat sf = new StringFormat();

            sf.Alignment     = StringAlignment.Center;
            sf.LineAlignment = StringAlignment.Center;
            graphics.DrawString(this.Text, new Font("Tahoma", 8), Brushes.Black,
                                new Rectangle(MiddlePoint.X - 3 * (rightPoint.X - leftPoint.X) / 8, MiddlePoint.Y - 3 * (bottomPoint.Y - topPoint.Y) / 8,
                                              6 * (rightPoint.X - leftPoint.X) / 8, 6 * (bottomPoint.Y - topPoint.Y) / 8),
                                sf);

            graphics.DrawString("T", new Font("Tahoma", 12), Brushes.Black, new Rectangle(leftPoint.X - 15, leftPoint.Y - 15, 15, 15), sf);
            graphics.DrawString("F", new Font("Tahoma", 12), Brushes.Black, new Rectangle(rightPoint.X, rightPoint.Y - 15, 15, 15), sf);

            if (OutLinkLeft.LinkedTo != null)
            {
                LinkButton.DrawLinkOutToIn(OutLinkLeft.startLinkPoint, OutLinkLeft.LinkedTo.endLinkPoint, srcBitmap, srcPictureBox);
            }
            else
            {
                OutLinkLeft.DrawLinkButton(srcBitmap, srcPictureBox);
            }

            if (OutLinkRight.LinkedTo != null)
            {
                LinkButton.DrawLinkOutToIn(OutLinkRight.startLinkPoint, OutLinkRight.LinkedTo.endLinkPoint, srcBitmap, srcPictureBox);
            }
            else
            {
                OutLinkRight.DrawLinkButton(srcBitmap, srcPictureBox);
            }

            if (InLink.LinkedTo != null)
            {
                LinkButton.DrawLinkOutToIn(InLink.LinkedTo.startLinkPoint, InLink.endLinkPoint, srcBitmap, srcPictureBox);
            }
            else
            {
                InLink.DrawLinkButton(srcBitmap, srcPictureBox);
            }


            srcPictureBox.Invalidate();
        }