Esempio n. 1
0
        void mnuRemovePort_Click(object sender, EventArgs e)
        {
            Control p = this.Parent;

            if (p != null)
            {
                ObjectDrawing ov = this.Owner as ObjectDrawing;
                if (ov != null && ov.ObjectEntity != null && ov.ObjectEntity.ProgEntity != null)
                {
                    ov.ObjectEntity.ProgEntity.RemoveOutport(this.PortID);
                    this.ClearLine();
                    p.Controls.Remove(this.Label);
                    p.Controls.Remove(this);
                    ILinkLineNode l = this.NextNode;
                    while (l != null)
                    {
                        l.ClearLine();
                        p.Controls.Remove((Control)l);
                        l = l.NextNode;
                    }
                    p.Refresh();
                    IMathDesigner im = p as IMathDesigner;
                    if (im != null)
                    {
                        im.Changed = true;
                    }
                }
            }
        }
        public override object Clone()
        {
            ObjectDrawing clone = (ObjectDrawing)base.Clone();

            clone.DotSize = _dotSize;
            if (_entity != null)
            {
                clone.ObjectEntity = (IProgramEntity)_entity.Clone();
            }
            return(clone);
        }
Esempio n. 3
0
        private void mnuNewPort_Click(object sender, EventArgs e)
        {
            Control p = this.Parent;

            if (p != null)
            {
                ObjectDrawing ov = this.Owner as ObjectDrawing;
                if (ov != null && ov.ObjectEntity != null && ov.ObjectEntity.ProgEntity != null)
                {
                    ov.CreateOutport();
                }
            }
        }
Esempio n. 4
0
        protected override LinkLineNode CreateTargetLinkNode()
        {
            Control p = this.Parent;

            if (p != null)
            {
                ObjectDrawing ov = this.Owner as ObjectDrawing;
                if (ov != null && ov.ObjectEntity != null && ov.ObjectEntity.ProgEntity != null)
                {
                    LinkLineNode ll = ov.CreateOutport();
                    if (ll != null)
                    {
                        return(ll.End);
                    }
                }
            }
            return(null);
        }