本文整理汇总了C#中Instance.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# Instance.Clone方法的具体用法?C# Instance.Clone怎么用?C# Instance.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Instance
的用法示例。
在下文中一共展示了Instance.Clone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawLoaded
// Draw the Instance list
public override void DrawLoaded(Rect box)
{
// Setup the layout
Rect pos = box;
pos.x += ImagePack.innerMargin;
pos.y += ImagePack.innerMargin;
pos.width -= ImagePack.innerMargin;
pos.height = ImagePack.fieldHeight;
if (dataRegister.Count <= 0) {
pos.y += ImagePack.fieldHeight;
ImagePack.DrawLabel (pos.x, pos.y, "You must create an Instance before edit it.");
return;
}
// Draw the content database info
ImagePack.DrawLabel (pos.x, pos.y, "Instance Configuration");
if (newItemCreated) {
newItemCreated = false;
LoadSelectList ();
newSelectedDisplay = displayKeys.Count - 1;
}
// Draw data Editor
if (newSelectedDisplay != selectedDisplay) {
selectedDisplay = newSelectedDisplay;
int displayKey = displayKeys [selectedDisplay];
editingDisplay = dataRegister [displayKey];
originalDisplay = editingDisplay.Clone ();
}
//if (!displayList.showList) {
pos.y += ImagePack.fieldHeight;
pos.x -= ImagePack.innerMargin;
pos.y -= ImagePack.innerMargin;
pos.width += ImagePack.innerMargin;
DrawEditor (pos, false);
pos.y -= ImagePack.fieldHeight;
//pos.x += ImagePack.innerMargin;
pos.y += ImagePack.innerMargin;
pos.width -= ImagePack.innerMargin;
//}
if (state != State.Loaded) {
// Draw combobox
pos.width /= 2;
pos.x += pos.width;
newSelectedDisplay = ImagePack.DrawCombobox (pos, "", selectedDisplay, displayList);
pos.x -= pos.width;
pos.width *= 2;
}
}