示例#1
0
        public Port(Port prototype) : base(prototype)
        {
            SuspendEvents = true;

            Label       = null;
            StencilItem = null;

            mAlignment   = prototype.Alignment;
            mOffset      = prototype.Offset;
            mAllowMove   = prototype.AllowMove;
            mAllowRotate = prototype.AllowRotate;
            mDirection   = prototype.Direction;
            mInteraction = prototype.Interaction;
            Label        = null;
            mPortStyle   = prototype.Style;
            Cursor       = prototype.Cursor;

            mPercent     = prototype.Percent;
            mOrientation = prototype.Orientation;

            //Needed for action mvoe
            mParent = prototype.Parent;

            SuspendEvents = false;
        }
示例#2
0
        public Port(Port prototype) : base(prototype)
        {
            Label       = null;
            StencilItem = null;

            _offset      = prototype.Offset;
            _allowMove   = prototype.AllowMove;
            _allowRotate = prototype.AllowRotate;
            _direction   = prototype.Direction;
            _interaction = prototype.Interaction;
            Label        = null;
            _portStyle   = prototype.Style;
            Cursor       = prototype.Cursor;

            _percent     = prototype.Percent;
            _orientation = prototype.Orientation;

            //Needed for action move
            _parent   = prototype.Parent;
            Alignment = prototype.Alignment;
        }
示例#3
0
        //Deserializes info into a new solid element
        protected Port(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            SuspendEvents = true;

            Validate = false;

            Alignment    = (PortAlignment)Enum.Parse(typeof(PortAlignment), info.GetString("Alignment"), true);
            mPortStyle   = (PortStyle)Enum.Parse(typeof(PortStyle), info.GetString("Style"), true);
            AllowMove    = info.GetBoolean("AllowMove");
            AllowRotate  = info.GetBoolean("AllowRotate");
            DrawSelected = info.GetBoolean("DrawSelected");
            Selected     = info.GetBoolean("Selected");
            Direction    = (Direction)Enum.Parse(typeof(Direction), info.GetString("Direction"), true);
            Interaction  = (UserInteraction)Enum.Parse(typeof(UserInteraction), info.GetString("Interaction"), true);

            mOrientation = (PortOrientation)Enum.Parse(typeof(PortOrientation), info.GetString("Orientation"), true);
            mPercent     = info.GetSingle("Percent");

            Validate      = true;
            SuspendEvents = false;
        }
示例#4
0
		//Deserializes info into a new solid element
		protected Port(SerializationInfo info, StreamingContext context): base(info,context)
		{
			SuspendEvents = true;

			Validate = false;

			Alignment = (PortAlignment) Enum.Parse(typeof(PortAlignment), info.GetString("Alignment"),true);
			mPortStyle = (PortStyle) Enum.Parse(typeof(PortStyle), info.GetString("Style"),true);
			AllowMove = info.GetBoolean("AllowMove");
			AllowRotate = info.GetBoolean("AllowRotate");
			DrawSelected = info.GetBoolean("DrawSelected");
			Selected = info.GetBoolean("Selected");
			Direction = (Direction) Enum.Parse(typeof(Direction), info.GetString("Direction"),true);
			Interaction = (UserInteraction) Enum.Parse(typeof(UserInteraction), info.GetString("Interaction"),true);

			mOrientation = (PortOrientation) Enum.Parse(typeof(PortOrientation), info.GetString("Orientation"),true);
			mPercent = info.GetSingle("Percent");

			Validate = true;
			SuspendEvents = false;
		}
示例#5
0
		public Port(Port prototype): base(prototype)
		{
			SuspendEvents = true;

			Label = null;
			StencilItem = null;

			mAlignment = prototype.Alignment;				
			mOffset = prototype.Offset;
			mAllowMove = prototype.AllowMove;
			mAllowRotate = prototype.AllowRotate;
			mDirection = prototype.Direction;
			mInteraction = prototype.Interaction;
			Label = null;
			mPortStyle = prototype.Style;
			Cursor = prototype.Cursor;

			mPercent = prototype.Percent;
			mOrientation = prototype.Orientation;
			
			//Needed for action mvoe
			mParent = prototype.Parent;

			SuspendEvents = false;
		}