Exemplo n.º 1
0
        public static void WriteConfiguration(Parts.IActor actor, Kc.Chunk outputChunk)
        {
            Parts.IProperty[] properties = actor.Properties;

            foreach (Parts.IProperty p in properties)
            {
                WriteValue(outputChunk, p);
            }
        }
Exemplo n.º 2
0
        public static void ReadConfiguration(Parts.IActor actor, Kc.Chunk inputChunk)
        {
            Parts.IProperty[] properties = actor.Properties;

            foreach (Parts.IProperty p in properties)
            {
                ReadValue(inputChunk, p);
            }
        }
Exemplo n.º 3
0
        public static bool WriteValue(Kc.Chunk outputChunk, Parts.IProperty property)
        {
            if (property.CurrentValue != null)
            {
                outputChunk.SetValue(property.Name, property.CurrentValue);
                return(true);
            }

            return(false);
        }
Exemplo n.º 4
0
 public static bool ReadValue(Kc.Chunk inputChunk, Parts.IProperty property)
 {
     if (property.DefaultValue != null)
     {
         object valueObject = inputChunk.GetValueObject(property.Name, property.DefaultValue);
         property.CurrentValue = valueObject;
         return(true);
     }
     return(false);
 }