当前位置: 首页>>代码示例>>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;未经允许,请勿转载。