Пример #1
0
        /// <summary>
        /// Deserialization constructor
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected AffineTransformation(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            outConnector           = (Connector)info.GetValue("outConnector", typeof(Connector));
            outConnector.BelongsTo = this;
            Connectors.Add(outConnector);

            inConnector           = (Connector)info.GetValue("inConnector", typeof(Connector));
            inConnector.BelongsTo = this;
            Connectors.Add(inConnector);

            outputType = (AutomataDataType)info.GetValue("outputType", typeof(AutomataDataType));

            shiftValue = info.GetInt32("shiftValue");

            scalingValue = info.GetInt32("scalingValue");
        }
Пример #2
0
        protected override void SetPropertyBagValue(object sender, PropertySpecEventArgs e)
        {
            base.SetPropertyBagValue(sender, e);
            switch (e.Property.Name)
            {
            case "ShiftValue":
                this.shiftValue = (float)e.Value; break;

            case "ScalingValue":

                this.scalingValue = (float)e.Value;

                break;

            case "OutputType":
                this.outputType = (AutomataDataType)e.Value; break;
            }
        }