void Button_preview_Clicked(object sender, System.EventArgs e)
{
if (radioButton2.Active)
{
try
{
fontloc = string.IsNullOrEmpty(FileName) ?
entry_font.Text : Path.GetFullPath((new Uri(Path.Combine(Path.GetDirectoryName(FileName), entry_font.Text))).LocalPath);
PrivateFontCollection fontCol = new PrivateFontCollection();
fontCol.AddFontFile(fontloc);
font = fontCol.Families[0].Name;
}
catch
{
MessageDialog.ShowError("Could not load the font :(");
return;
}
}
else
font = _core.Font;
web1.LoadHtml(GenerateHTML(), "");
}