Skip to content

Commit

Permalink
Small changes around missing font resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelTroka committed May 11, 2017
1 parent 760d950 commit 8e49437
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Computator.NET/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,16 @@ private static void CurrentDomain_UnhandledException(object sender, UnhandledExc
if (ex.Message.ToLowerInvariant().Contains("font"))
{
//e.IsTerminating = false;

MessageBox.Show(Strings.Program_CurrentDomain_UnhandledException_Try_installing_font_);
var fonts = Directory.EnumerateFiles(AppInformation.FontsDirectory, "*.*", SearchOption.AllDirectories)
.Where(s => s.EndsWith(".ttc", StringComparison.OrdinalIgnoreCase) ||
s.EndsWith(".ttf", StringComparison.OrdinalIgnoreCase) ||
s.EndsWith(".otf", StringComparison.OrdinalIgnoreCase));
foreach (var font in fonts)
if (MessageBox.Show(Strings.Program_CurrentDomain_UnhandledException_Try_installing_font_,Strings.Warning_,MessageBoxButtons.OKCancel) == DialogResult.OK)
{
Process.Start(font);//ttc/ttf/otf
var fonts = Directory.EnumerateFiles(AppInformation.FontsDirectory, "*.*", SearchOption.AllDirectories)
.Where(s => s.EndsWith(".ttc", StringComparison.OrdinalIgnoreCase) ||
s.EndsWith(".ttf", StringComparison.OrdinalIgnoreCase) ||
s.EndsWith(".otf", StringComparison.OrdinalIgnoreCase));
foreach (var font in fonts)
{
Process.Start(font);//ttc/ttf/otf
}
}
}

Expand Down

0 comments on commit 8e49437

Please sign in to comment.