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


C# Document.GetType方法代碼示例

本文整理匯總了C#中System.Windows.Forms.Document.GetType方法的典型用法代碼示例。如果您正苦於以下問題:C# Document.GetType方法的具體用法?C# Document.GetType怎麽用?C# Document.GetType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Windows.Forms.Document的用法示例。


在下文中一共展示了Document.GetType方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ClearChildNodesFor

 //////////////////////////////////////////////////////////////////////////////////////////
 public void ClearChildNodesFor(Document.DocumentPart part, string collectionName)
 {
     if (part is Document.AutomatedTest)
     {
         ClearChildNodesTest(part as Document.AutomatedTest, collectionName);
     }
     else if (part is Document.Target)
     {
         ClearChildNodesTarget(part as Document.Target, collectionName);
     }
     else if (part is Document.Project)
     {
         ClearChildNodesProject(part as Document.Project, collectionName);
     }
     else
         throw new ApplicationException("Internal error: Invalid document part type: " + part.GetType().ToString());
 }
開發者ID:asr340,項目名稱:owasp-code-central,代碼行數:18,代碼來源:TreeViewAdapter.cs

示例2: RemoveNodeFor

 //////////////////////////////////////////////////////////////////////////////////////////
 public void RemoveNodeFor(Document.DocumentPart part)
 {
     if (part is Document.Alert)
     {
         RemoveAlert(part as Document.Alert);
     }
     else if (part is Document.TestParameter)
     {
         RemoveTestParameter(part as Document.TestParameter);
     }
     else if (part is Document.AutomatedTest)
     {
         RemoveTest(part as Document.AutomatedTest);
     }
     else if (part is Document.Target)
     {
         RemoveTarget(part as Document.Target);
     }
     else if (part is Document.Project)
     {
         //RemoveProject(part as Document.Project);
     }
     else
         throw new ApplicationException("Internal error: Invalid document part type: " + part.GetType().ToString());
 }
開發者ID:asr340,項目名稱:owasp-code-central,代碼行數:26,代碼來源:TreeViewAdapter.cs

示例3: AddNodeFor

 public void AddNodeFor(Document.DocumentPart part, bool refreshParent)
 {
     if (part is Document.Alert)
     {
         AddAlert(part as Document.Alert, null, refreshParent);
     }
     else if (part is Document.TestParameter)
     {
         AddTestParameter(part as Document.TestParameter, null, refreshParent);
     }
     else if (part is Document.AutomatedTest)
     {
         AddTest(part as Document.AutomatedTest, null, refreshParent);
     }
     else if (part is Document.Target)
     {
         AddTarget(part as Document.Target, null, refreshParent);
     }
     else if (part is Document.Project)
     {
         AddProject(part as Document.Project);
     }
     else
         throw new ApplicationException("Internal error: Invalid document part type: " + part.GetType().ToString());
 }
開發者ID:asr340,項目名稱:owasp-code-central,代碼行數:25,代碼來源:TreeViewAdapter.cs

示例4: GetContextMenuFor

        public ContextMenuStrip GetContextMenuFor(Document.DocumentPart part)
        {
            if (part == null) return null;

            if (part is Document.Alert)
            {
                return ctxAlert;
            }
            else if (part is Document.TestParameter)
            {
                return ctxTestParameter;
            }
            else if (part is Document.AutomatedTest)
            {
                return ctxTest;
            }
            else if (part is Document.Target)
            {
                return ctxTarget;
            }
            else if (part is Document.Project)
            {
                return ctxProject;
            }
            else
                throw new ApplicationException("Internal error: Invalid document part type: " + part.GetType().ToString());
        }
開發者ID:asr340,項目名稱:owasp-code-central,代碼行數:27,代碼來源:TreeViewAdapter.cs


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