private string SelectHSpellFolderPath()
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
// Help locating the hspell-data-files folder
string hspellPath = System.Configuration.ConfigurationManager.AppSettings["hspellPath"];
if (string.IsNullOrEmpty(hspellPath) || !Directory.Exists(hspellPath))
{
string exeFile = (new System.Uri(System.Reflection.Assembly.GetEntryAssembly().CodeBase)).AbsolutePath;
hspellPath = System.IO.Path.GetDirectoryName(exeFile);
}
fbd.SelectedPath = hspellPath;
fbd.ShowNewFolderButton = false;
DialogResult dr = fbd.ShowDialog();
if (dr != DialogResult.OK)
return null;
return fbd.SelectedPath;
}