Наследование: Utility.GlobalizedObject, ICloneable, INamed
Пример #1
0
 /// <summary>
 /// Constructora que asigna los valores iniciales al material.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="isLocked"></param>
 /// <param name="designProps"></param>
 /// <param name="typeProps"></param>
 /// <param name="density"></param>
 public Material(string name, bool isLocked, MaterialDesignProps designProps, MaterialTypeProps typeProps, float density)
 {
     Name = name;
     designProperties = (MaterialDesignProps)designProps.Clone();
     typeProperties = (MaterialTypeProps)typeProps.Clone();
     this.density = density;
     IsLocked = isLocked;
 }
Пример #2
0
 /// <summary>
 /// Constructora que asigna los valores iniciales al material.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="isLocked"></param>
 /// <param name="designProps"></param>
 /// <param name="typeProps"></param>
 /// <param name="density"></param>
 public Material(string name, bool isLocked, MaterialDesignProps designProps, MaterialTypeProps typeProps, float density)
 {
     Name             = name;
     designProperties = (MaterialDesignProps)designProps.Clone();
     typeProperties   = (MaterialTypeProps)typeProps.Clone();
     this.density     = density;
     IsLocked         = isLocked;
 }
Пример #3
0
 private void store(OleDbConnection cn, string material, MaterialDesignProps props)
 {
     if (props is ConcreteDesignProps) store(cn, material, (ConcreteDesignProps)props);
     else if (props is NoDesignProps) store(cn, material, (NoDesignProps)props);
     else if (props is RebarDesignProps) store(cn, material, (RebarDesignProps)props);
     else if (props is AluminumDesignProps) store(cn, material, (AluminumDesignProps)props);
     else if (props is ColdFormedDesignProps) store(cn, material, (ColdFormedDesignProps)props);
     else if (props is SteelDesignProps) store(cn, material, (SteelDesignProps)props); // Se tiene que checar al final porque tiene herencia.
     else
         throw new NotSupportedException("Only specific DesignProps are supported, this method should not be called");
 }