Exemple #1
0
        private void rectangleShapeMouseDowmn(object sender, MouseEventArgs e)
        {
            Node_Front rec = new Node_Front();

            rec.DoDragDrop(rec, DragDropEffects.Copy);
            rec.BringToFront();
        }
 private void rectangleShapeMouseDowmn(object sender, MouseEventArgs e)
 {
     Node_Front rec = new Node_Front();
        // Form1.getInstance().Nodes.Add(rec);
     Form1.getInstance().senderNode = this.newNode;
     Form1.getInstance().startPointHyma2 = new Point(e.X + this.Location.X + this.nodeFront4.Location.X, e.Y + this.Location.Y + this.nodeFront4.Location.Y);
     rec.DoDragDrop(rec, DragDropEffects.Copy);
     rec.BringToFront();
 }
        private void rectangleShapeMouseDowmn(object sender, MouseEventArgs e)
        {
            Node_Front rec = new Node_Front();

            // Form1.getInstance().Nodes.Add(rec);
            Form1.getInstance().senderNode      = this.newNode;
            Form1.getInstance().startPointHyma2 = new Point(e.X + this.Location.X + this.nodeFront4.Location.X, e.Y + this.Location.Y + this.nodeFront4.Location.Y);
            rec.DoDragDrop(rec, DragDropEffects.Copy);
            rec.BringToFront();
        }
Exemple #4
0
        /// <summary>
        /// el function d el mafrood an2elha fel base class w hya elly bt3mel el instantiation
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void rectangleShape4_MouseClick(object sender, MouseEventArgs e)
        {
            Node_Front newInputRect = new Node_Front();

            newRect = newInputRect;
            Form1.getInstance().Controls.Add(newInputRect);
            int xPosition = this.rectangleShape4.Location.X + this.Location.X;
            int yPosition = this.rectangleShape4.Location.Y + this.Location.Y;

            // Point p = rectangleShape4.Parent.PointToScreen(rectangleShape4.Location);
            //newInputRect.Location = new Point((Cursor.Position.X - xPosition), (Cursor.Position.Y - yPosition));
            newInputRect.Location = new Point(xPosition, yPosition);
            newInputRect.BringToFront();
        }
 protected void generateNode(RectangleShape rec,Point ourLocation, MouseEventArgs e)
 {
     outRec = rec;
     Node_Front newInputRect = new Node_Front();
     newRect = newInputRect;
     Form1.getInstance().Controls.Add(newInputRect);
     int xPosition = outRec.Location.X + ourLocation.X;
     int yPosition = outRec.Location.Y + ourLocation.Y;
     // Point p = rectangleShape4.Parent.PointToScreen(rectangleShape4.Location);
     //newInputRect.Location = new Point((Cursor.Position.X - xPosition), (Cursor.Position.Y - yPosition));
     newInputRect.Location = new Point(xPosition, yPosition);
     newInputRect.BringToFront();
     this.DrawConnection(e);
 }
        protected void generateNode(RectangleShape rec, Point ourLocation, MouseEventArgs e)
        {
            outRec = rec;
            Node_Front newInputRect = new Node_Front();

            newRect = newInputRect;
            Form1.getInstance().Controls.Add(newInputRect);
            int xPosition = outRec.Location.X + ourLocation.X;
            int yPosition = outRec.Location.Y + ourLocation.Y;

            // Point p = rectangleShape4.Parent.PointToScreen(rectangleShape4.Location);
            //newInputRect.Location = new Point((Cursor.Position.X - xPosition), (Cursor.Position.Y - yPosition));
            newInputRect.Location = new Point(xPosition, yPosition);
            newInputRect.BringToFront();
            this.DrawConnection(e);
        }
 /// <summary>
 /// el function d el mafrood an2elha fel base class w hya elly bt3mel el instantiation
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void rectangleShape4_MouseClick(object sender, MouseEventArgs e)
 {
     Node_Front newInputRect = new Node_Front();
     newRect = newInputRect;
     Form1.getInstance().Controls.Add(newInputRect);
     int xPosition = this.rectangleShape4.Location.X + this.Location.X;
     int yPosition = this.rectangleShape4.Location.Y + this.Location.Y;
     // Point p = rectangleShape4.Parent.PointToScreen(rectangleShape4.Location);
     //newInputRect.Location = new Point((Cursor.Position.X - xPosition), (Cursor.Position.Y - yPosition));
     newInputRect.Location = new Point(xPosition, yPosition);
     newInputRect.BringToFront();
 }
 private void rectangleShapeMouseDowmn(object sender, MouseEventArgs e)
 {
     Node_Front rec = new Node_Front();
     rec.DoDragDrop(rec, DragDropEffects.Copy);
     rec.BringToFront();
 }