本文整理匯總了C#中System.Windows.Documents.Block.cloneSelf方法的典型用法代碼示例。如果您正苦於以下問題:C# Block.cloneSelf方法的具體用法?C# Block.cloneSelf怎麽用?C# Block.cloneSelf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Documents.Block
的用法示例。
在下文中一共展示了Block.cloneSelf方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: findSocketedMethods
//method to check sockets for variables
private static void findSocketedMethods(Block platform, Block newMethodBlock)
{
List<int> socketLocs = socketFinder(platform);
ListBox socket;
//cycling through sockets to search
foreach (int locale in socketLocs)
{
socket = socketMole(platform, locale);
if (socket.Items.Count > 0)
{
Block tempBlock = (Block)socket.Items.ElementAt(0);
//recursive call to go as deep into socket as possible
if (tempBlock.flag_hasSocks && !tempBlock.Text.Equals("METHOD"))
{
findSocketedMethods(tempBlock, newMethodBlock);
}
else if (tempBlock.metadataList.Count >= 2 && tempBlock.metadataList[1].Equals(newMethodBlock.metadataList[1])) //bearing and infinite blocks need the metadatalistcheck
{
ListBox socketBox = tempBlock.Parent as ListBox;
SocketDragDropTarget SDDT = socketBox.Parent as SocketDragDropTarget;
SDDT.removeItem(socketBox);
SDDT.ResizeAndAdd(socketBox, newMethodBlock.cloneSelf(true));
}
else if (tempBlock.flag_hasSocks) //method in a method check?
{
findSocketedMethods(tempBlock, newMethodBlock);
}
}
}
}