Пример #1
0
        public ParticleSubParameterConverter(ParticleParameterDescriptor.PropertyChangeDelegate changeDelegate, ParticleDeclaration.Parameter declarationParameter, ParticleDefinition.Parameter definitionParameter)
        {
            propertyDescriptor = new PropertyDescriptorCollection(new PropertyDescriptor[0]);

            foreach (var paramPair in declarationParameter.Parameters)
            {
                ParticleDeclaration.Parameter parameter = paramPair.Value;
                var descriptor = new ParticleParameterDescriptor(parameter, definitionParameter.Parameters[parameter.Name]);
                descriptor.PropertyChanged += delegate(string name) { changeDelegate(declarationParameter.Name + "." + name); };
                propertyDescriptor.Add(descriptor);
            }
        }
 public ParticleParameterDescriptor(ParticleDeclaration.Parameter declarationParameter, ParticleDefinition.Parameter definitionParameter)
     : base(declarationParameter.Name, null)
 {
     DeclarationParameter = declarationParameter;
     DefinitionParameter  = definitionParameter;
 }