示例#1
0
        public virtual DrawFBDBox GetLeftEndConnectionDrawFBDBox(int _pinno)
        {
            if (LeftPins[_pinno].Connected)
            {
                Guid     wireguid  = LeftPins[_pinno].GetRightGUID();
                DrawWire _drawwire = Parentpagelist.GetDrawWireObject(wireguid);
                return(Parentpagelist.GetFBDBoxObject(_drawwire.LeftGuid));
            }

            return(null);
        }
示例#2
0
        public virtual string GetLeftEndConnectionStringOfPin(int _pinno)
        {
            if (LeftPins[_pinno].Connected)
            {
                Guid     wireguid  = LeftPins[_pinno].GetRightGUID();
                DrawWire _drawwire = Parentpagelist.GetDrawWireObject(wireguid);
                return(Parentpagelist.GetFBDBoxObject(_drawwire.LeftGuid).GetOutputPinExpression(_drawwire.LeftPinNo));
                //DrawFBDBox drawfbdbox = drawArea.GetFBDBoxObject(leftguid);
                //return drawfbdbox.GetRightPinConnectionString(_drawwire.LeftPinNo);
            }

            return("");
        }
        public override string GetLeftEndConnectionStringOfPin(int _pinno)
        {
            if (LeftPins[_pinno].Connected)
            {
                Guid       wireguid   = LeftPins[_pinno].GetRightGUID();
                DrawWire   _drawwire  = Parentpagelist.GetDrawWireObject(wireguid);
                Guid       leftguid   = _drawwire.LeftGuid;
                DrawFBDBox drawfbdbox = Parentpagelist.GetFBDBoxObject(leftguid);
                //drawfbdbox.GetLeftEndConnectionStringOfPin(_drawwire.LeftPinNo);
                return(LeftPins[_pinno].PinName + ":=" + drawfbdbox.GetRightPinConnectionString(_drawwire.LeftPinNo));
            }

            return("");
        }
示例#4
0
        public virtual List <int> GetRightSideConnectionTypes(int _pinno)
        {
            List <int> _type = new List <int>();

            foreach (Guid guid in  RightPins[_pinno].WireConnectionID)
            {
                DrawWire   _drawwire  = Parentpagelist.GetDrawWireObject(guid);
                Guid       rightguid  = _drawwire.RightGuid;
                DrawFBDBox drawfbdbox = Parentpagelist.GetFBDBoxObject(rightguid);
                _type.Add(drawfbdbox.GetLeftPinType(_drawwire.RightPinNo));
            }

            return(_type);
        }
示例#5
0
        public override bool Load(object obj)
        {
            bool ret = false;

            Dirty = false;
            tblfbdpinconnection = (tblFBDPinConnection)obj;
            SQLID = tblfbdpinconnection.FBDPinConnectionID;
            //InstanseName = tblfbdpinconnection.InstanceName;
            NewObject = false;
            //OutputObjectName = tblfbdpinconnection.OutputObjectName;
            //InputObjectName = tblfbdpinconnection.InputObjectName;
            RightObjectSQLID = tblfbdpinconnection.RightObjectID;
            LeftObjectSQLID  = tblfbdpinconnection.LeftObjectID;
            RightGuid        = Parentpagelist.ReturnFBDBoxGUID(RightObjectSQLID, tblfbdpinconnection.Page);
            LeftGuid         = Parentpagelist.ReturnFBDBoxGUID(LeftObjectSQLID, tblfbdpinconnection.Page);
            //OutputObjectID = tblfbdpinconnection.OutputObjectID;
            //InputObjectID = tblfbdpinconnection.InputObjectID;
            RightPinNo = tblfbdpinconnection.RightPinNo;
            LeftPinNo  = tblfbdpinconnection.LeftPinNo;
            //OutputPinID = tblfbdpinconnection.OutputPinID;
            //InputPinID = tblfbdpinconnection.InputPinID;
            AutoDraw     = tblfbdpinconnection.autodraw;
            _pointArray0 = Parentpagelist.GetFBDBoxObject(LeftGuid).GetRightPinPosition(LeftPinNo);
            //_pointArray0.X = tblfbdpinconnection.X0;
            //_pointArray0.Y = tblfbdpinconnection.Y0;
            _pointArray1.X = tblfbdpinconnection.X1;
            _pointArray1.Y = tblfbdpinconnection.Y1;
            _pointArray2.X = tblfbdpinconnection.X2;
            _pointArray2.Y = tblfbdpinconnection.Y2;
            _pointArray3.X = tblfbdpinconnection.X3;
            _pointArray3.Y = tblfbdpinconnection.Y3;
            _pointArray4.X = tblfbdpinconnection.X4;
            _pointArray4.Y = tblfbdpinconnection.Y4;
            _pointArray5   = Parentpagelist.GetFBDBoxObject(RightGuid).GetLeftPinPosition(RightPinNo);
            //_pointArray5.X = tblfbdpinconnection.X5;
            //_pointArray5.Y = tblfbdpinconnection.Y5;
            ConnectionIsOk = true;
            Addlinks();
            UpdateWireConections();
            //Leftstring =  drawArea.GetFBDBoxObject(LeftGuid).GetRightPinConnectionString(LeftPinNo);
            Leftstring = Parentpagelist.GetFBDBoxObject(LeftGuid).GetOutputPinExpression(LeftPinNo);
            return(ret);
        }
示例#6
0
 public void Addlinks()
 {
     Parentpagelist.GetFBDBoxObject(RightGuid).AddConnectionToPort(this.GUID, true, RightPinNo);
     Parentpagelist.GetFBDBoxObject(LeftGuid).AddConnectionToPort(this.GUID, false, LeftPinNo);
 }