本文整理汇总了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());
}
示例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());
}
示例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());
}
示例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());
}