public static BitmapSource Load(string databaseRootPath, string hyphenKey, double dpi = 96, TankIconType type = TankIconType.Normal) { if (hyphenKey == VirtualTankIconKey) { hyphenKey = "ussr-Observer"; } var path = TankIcon.GetEntryKey(hyphenKey, type); if (PackageStream.IsFileExisted(Path.Combine(databaseRootPath, PackageImage.GuiPackage), path)) { return(PackageImage.Load(databaseRootPath, PackageImage.GuiPackage, path)); } return(PackageImage.Load(databaseRootPath, PackageImage.GuiPackage, TankIcon.GetEntryKey("noImage", type))); }
public static bool Exists(string databaseRootPath, string hyphenKey, TankIconType type = TankIconType.Normal) { if (hyphenKey == VirtualTankIconKey) { return(true); } return(PackageStream.IsFileExisted(Path.Combine(databaseRootPath, PackageImage.GuiPackage), TankIcon.GetEntryKey(hyphenKey, type))); }