protected void BuildContactPoints ()
		{
			int halflen = 5;
			int len = halflen * 2;
			AddContactPoint (new OperationContactPointGlyph (new Rectangle (_Bounds.X - halflen, _Bounds.Y + _Bounds.Height / 2 - halflen, len, len), this, new OffsetChangedHandler (horizontal_ContactPoint)));
			AddContactPoint (new OperationContactPointGlyph (new Rectangle (_Bounds.X + _Bounds.Width - halflen, _Bounds.Y + _Bounds.Height / 2 - halflen, len, len), this, new OffsetChangedHandler (horizontal_ContactPoint)));
			AddContactPoint (new OperationContactPointGlyph (new Rectangle (_Bounds.X + _Bounds.Width / 2 - halflen, _Bounds.Y - halflen, len, len), this, new OffsetChangedHandler (vertical_ContactPoint)));
			AddContactPoint (new OperationContactPointGlyph (new Rectangle (_Bounds.X + _Bounds.Width / 2 - halflen, _Bounds.Y + _Bounds.Height - halflen, len, len), this, new OffsetChangedHandler (vertical_ContactPoint)));

		
			halflen = 10;
			len = halflen * 2;
			for (int index = 0; index < 3; index++)
			{
				IGlyph child = new OperationPortGlyph (new Rectangle (_Bounds.X + len, _Bounds.Y + len + len * index * 2, len, len), this, "Param" + index.ToString ());
				child.Parent = this;
			}
		}
Пример #2
0
        protected void BuildContactPoints()
        {
            int halflen = 5;
            int len     = halflen * 2;

            AddContactPoint(new OperationContactPointGlyph(new Rectangle(_Bounds.X - halflen, _Bounds.Y + _Bounds.Height / 2 - halflen, len, len), this, new OffsetChangedHandler(horizontal_ContactPoint)));
            AddContactPoint(new OperationContactPointGlyph(new Rectangle(_Bounds.X + _Bounds.Width - halflen, _Bounds.Y + _Bounds.Height / 2 - halflen, len, len), this, new OffsetChangedHandler(horizontal_ContactPoint)));
            AddContactPoint(new OperationContactPointGlyph(new Rectangle(_Bounds.X + _Bounds.Width / 2 - halflen, _Bounds.Y - halflen, len, len), this, new OffsetChangedHandler(vertical_ContactPoint)));
            AddContactPoint(new OperationContactPointGlyph(new Rectangle(_Bounds.X + _Bounds.Width / 2 - halflen, _Bounds.Y + _Bounds.Height - halflen, len, len), this, new OffsetChangedHandler(vertical_ContactPoint)));


            halflen = 10;
            len     = halflen * 2;
            for (int index = 0; index < 3; index++)
            {
                IGlyph child = new OperationPortGlyph(new Rectangle(_Bounds.X + len, _Bounds.Y + len + len * index * 2, len, len), this, "Param" + index.ToString());
                child.Parent = this;
            }
        }