/// <summary>
        ///		Clona hasta una variación
        /// </summary>
        public MovementVariationModel CloneTo(MovementBaseModel parent, MovementVariationModel target, MovementFigureModel movement)
        {
            MovementVariationModel variation = new MovementVariationModel(parent);

            // Clona los movimientos
            variation.Movements.AddRange(Movements.CloneTo(variation, target, movement));
            // Devuelve la variación clonada
            return(variation);
        }
        /// <summary>
        ///		Clona una variación
        /// </summary>
        public MovementVariationModel Clone(MovementBaseModel parent)
        {
            MovementVariationModel target = new MovementVariationModel(parent);

            // Clona las propiedades
            target.Id = Id;
            // Clona los movimientos
            target.Movements.AddRange(Movements.Clone());
            // Devuelve la variación clonada
            return(target);
        }
Beispiel #3
0
 /// <summary>
 ///		Clona los datos internos
 /// </summary>
 protected void CloneInner(MovementBaseModel target)
 {
     // Clona las propiedades
     target.Id = Id;
     // Clona los comentarios
     foreach (string comment in Comments)
     {
         target.Comments.Add(comment);
     }
     // Clona la información adicional
     foreach (MovementInfoModel info in Info)
     {
         target.Info.Add(new MovementInfoModel(info.Content));
     }
     // Clona las variaciones
     foreach (MovementVariationModel variation in Variations)
     {
         target.Variations.Add(variation.Clone(target));
     }
 }
 public MovementVariationModel(MovementBaseModel parent)
 {
     Parent = parent;
 }