Logic to create the Continuous Action Summary

Added a default windows font path (hard coded) when one cannot be derived.
This commit is contained in:
2015-10-23 18:22:01 +00:00
parent 8ad203006d
commit 6dd816dba8
2 changed files with 338 additions and 1 deletions

View File

@@ -44,7 +44,10 @@ namespace Volian.Svg.Library
if (_FontDir == null)
{
RegistryKey regKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders");
_FontDir = regKey.GetValue("Fonts").ToString();
if (regKey != null)
_FontDir = regKey.GetValue("Fonts").ToString();
if (_FontDir == null) // Not allowed or cannot find the fonts folder value in the registry.
_FontDir = @"C:\Windows\Fonts"; // default to C:\Windows\Fonts
}
return _FontDir;
}