本文整理汇总了C#中PhactoryHost.GetFileExtension方法的典型用法代码示例。如果您正苦于以下问题:C# PhactoryHost.GetFileExtension方法的具体用法?C# PhactoryHost.GetFileExtension怎么用?C# PhactoryHost.GetFileExtension使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhactoryHost
的用法示例。
在下文中一共展示了PhactoryHost.GetFileExtension方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetTreeViewResource
private void SetTreeViewResource(TreeNode uiNode, PhactoryHost.Database.Resource resource)
{
App.Controller.View.AppDoEvents();
uiNode.ContextMenuStrip = contextMenuStripResource;
string extension = resource.GetFileExtension();
string key;
switch (extension)
{
case ".s": key = "FileASM"; break;
case ".asm": key = "FileASM"; break;
case ".cxx": key = "FileC"; break;
case ".c": key = "FileC"; break;
case ".h": key = "FileH"; break;
case ".cpp": key = "FileCPP"; break;
case ".txt": key = "FileTXT"; break;
case ".cpcbigfile":
case ".cpcbin2c":
case ".cpcbitmap":
case ".cpccloud":
case ".cpcdsk":
case ".cpcpack":
case ".cpctext":
key = "FileProp"; break;
case ".bmp": key = "VSProject_imagefile"; break;
case ".bin":
case ".dsk":
case ".raw":
case ".packed":
case ".bmp.packed":
case ".bin.packed": key = "VSObject_Type"; break;
default:
key = "FileGeneric"; break;
}
uiNode.ImageKey = key;
uiNode.SelectedImageKey = key;
if (App.Controller.Entities.StartupResourceId == resource.Id)
{
uiNode.NodeFont = boldFont;
startupNode = uiNode;
}
else
{
if (App.Controller.Entities.IsOutput(resource))
{
uiNode.ImageKey = "VSProject_generatedfile";
uiNode.SelectedImageKey = "VSProject_generatedfile";
uiNode.NodeFont = italicFont;
}
else
{
uiNode.NodeFont = itemFont;
}
}
}