Ejemplo n.º 1
0
 public StartBlock(int xMouse, int yMouse) : base("START")
 {
     X         = xMouse - Width / 2;
     Y         = yMouse - Height / 2;
     IsPresent = true;
     OutLink   = new OutLinkButton(X + Width / 2 - OutLinkButton.R, Y + Height - OutLinkButton.R);
 }
Ejemplo n.º 2
0
 public OperationBlock(int xMouse, int yMouse, string text)
     : base(text)
 {
     X       = xMouse - Width / 2;
     Y       = yMouse - Height / 2;
     InLink  = new InLinkButton(X + Width / 2 - InLinkButton.R, Y - InLinkButton.R);
     OutLink = new OutLinkButton(X + Width / 2 - OutLinkButton.R, Y + Height - OutLinkButton.R);
 }
Ejemplo n.º 3
0
        public static void LinkOutToIn(Point A, Point B, OutLinkButton outLinkButton, InLinkButton inLinkButton, Bitmap srcBitmap, PictureBox srcPictureBox)
        {
            outLinkButton.LinkedTo = inLinkButton;
            inLinkButton.LinkedTo  = outLinkButton;

            outLinkButton.startLinkPoint = A;
            inLinkButton.endLinkPoint    = B;

            DrawLinkOutToIn(A, B, srcBitmap, srcPictureBox);
        }
Ejemplo n.º 4
0
        }                                               // false;
        public DecisionBlock(int xMouse, int yMouse, string text)
            : base(text)
        {
            topPoint    = new Point(xMouse, yMouse - HalfDiameter);
            rightPoint  = new Point(xMouse + HalfDiameter, yMouse);
            bottomPoint = new Point(xMouse, yMouse + HalfDiameter);
            leftPoint   = new Point(xMouse - HalfDiameter, yMouse);

            InLink       = new InLinkButton(topPoint.X - InLinkButton.R, topPoint.Y - InLinkButton.R);
            OutLinkLeft  = new OutLinkButton(leftPoint.X - OutLinkButton.R, leftPoint.Y - OutLinkButton.R);
            OutLinkRight = new OutLinkButton(rightPoint.X - OutLinkButton.R, rightPoint.Y - OutLinkButton.R);
        }
Ejemplo n.º 5
0
 public override void RemoveLinks()
 {
     if (InLink.LinkedTo != null)
     {
         InLink.LinkedTo.LinkedTo = null;
     }
     InLink = null;
     if (OutLink.LinkedTo != null)
     {
         OutLink.LinkedTo.LinkedTo = null;
     }
     OutLink = null;
 }
Ejemplo n.º 6
0
        private void NewScheme(int Width, int Height)
        {
            ifLineDraw       = false;
            linkStartButton  = null;
            notAllowedInLink = null;
            textBox1.Text    = "";
            textBox1.Enabled = false;

            StartBlock.IsPresent = false;
            blockList.Clear();
            pictureBox1.Size = new Size(Width, Height);
            bit = new Bitmap(pictureBox1.Width, pictureBox1.Height);
            Graphics flagGraphics = Graphics.FromImage(bit);

            flagGraphics.Clear(Color.White);
            pictureBox1.Image = bit;
            pictureBox1.Refresh();
        }