當前位置: 首頁>>代碼示例>>C#>>正文


C# Block.cloneSelf方法代碼示例

本文整理匯總了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);
             }
         }
     }
 }
開發者ID:dhumphri,項目名稱:CSE485-Columba,代碼行數:32,代碼來源:SocketReader.cs


注:本文中的System.Windows.Documents.Block.cloneSelf方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。