Exemplo n.º 1
0
 // COPY PROPERTY //
 //
 virtual public void CopyProperty(BaseProperty originalProperty, AmpsBlueprint theOwnerBlueprint)
 {
     // We don't copy non-user-editable properties so their values
     // don't linger, code updates are followed in already placed properties
     // after the next blueprint commit.
     //
     //name = originalProperty.name;
     //allowDataModeRandomConstant = originalProperty.allowDataModeRandomConstant;
     //allowDataModeCurve = originalProperty.allowDataModeCurve;
     //allowDataModeRandomCurve = originalProperty.allowDataModeRandomCurve;
     //allowDataModeReference = originalProperty.allowDataModeReference;
     //allowDataModeParameter = originalProperty.allowDataModeParameter;
     dataMode      = originalProperty.dataMode;
     reference     = originalProperty.reference;
     parameterName = originalProperty.parameterName;
     parameter     = originalProperty.parameter;
     if (theOwnerBlueprint != null)
     {
         ownerBlueprint = theOwnerBlueprint;
     }
     else
     {
         ownerBlueprint = originalProperty.ownerBlueprint;
     }
     coordSystem = originalProperty.coordSystem;
     coordSystemConversionMode = originalProperty.coordSystemConversionMode;
 }
Exemplo n.º 2
0
        // GET PARAMETER //
        //
        public BaseParameter GetParameter(string desiredParameterName, AmpsHelpers.eParameterTypes desiredType)
        {
            BaseParameter returnValue = null;

            if (parameters.Count > 0)
            {
                for (int i = 0; i < parameters.Count; i++)
                {
                    if (parameters[i].name == desiredParameterName && parameters[i].type == desiredType)
                    {
                        returnValue = parameters[i];
                        break;
                    }
                }
            }

            return(returnValue);
        }