本文整理汇总了C#中Slide.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# Slide.Clone方法的具体用法?C# Slide.Clone怎么用?C# Slide.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Slide
的用法示例。
在下文中一共展示了Slide.Clone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SaveSlideLevelChanges
public static Slide SaveSlideLevelChanges(this Slide slide, Slide other)
{
Slide clone = (Slide)other.Clone();
slide.LabelId = clone.LabelId;
slide.Name = clone.Name;
slide.Time = clone.Time;
slide.Comment = clone.Comment;
slide.Author = clone.Author;
slide.Modified = clone.Modified;
slide.DeviceList.Clear();
slide.DeviceList.AddRange(clone.DeviceList);
slide.SourceList.Clear();
slide.SourceList.AddRange(clone.SourceList);
slide.DisplayList.Clear();
slide.DisplayList.AddRange(clone.DisplayList);
return slide;
}
示例2: CloneSlide
Slide CloneSlide(Slide from)
{
Slide result = (Slide)from.Clone();
result.IsLocked = false;
result.State = SlideState.New;
result.Id = GetNextSlideId();
result.Name = GetNextSlideName();
// логика вся переехала в Slide.Clone
//https://sentinel2.luxoft.com/sen/issues/browse/PMEDIAINFOVISDEV-1194
//result.DisplayList.Clear();
//foreach (Display d in from.DisplayList)
//{
// Display newDisplay = d.Type.CreateNewDisplay();
// result.DisplayList.Add(newDisplay);
// foreach (Window w in d.WindowList)
// {
// newDisplay.WindowList.Add(w.SimpleClone());
// }
//}
//result.IsLocked = false;
return result;
}