Additional logic to try to start up the equation editor, modified message box and added to error log if it could not be started. B2016-278
This commit is contained in:
parent
a9bd84ad5f
commit
cc30214d31
@ -1027,7 +1027,10 @@ namespace Volian.Controls.Library
|
||||
// launch equation editor
|
||||
string EqnEdt = GetEqnEdt();
|
||||
if (EqnEdt == null)
|
||||
MessageBox.Show("Equation Editor is not correctly configured in the registry.", "Warning", MessageBoxButtons.OK);
|
||||
{
|
||||
_MyLog.WarnFormat("Equation Editor is not correctly configured in the registry.");
|
||||
MessageBox.Show("The Equation Editor needs to be started.", "Reminder", MessageBoxButtons.OK);
|
||||
}
|
||||
else
|
||||
Process.Start(EqnEdt);
|
||||
_MyEditItem.AddChild((E_FromType)fromtype, contenttype);
|
||||
@ -1051,6 +1054,17 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
||||
folderPath += @"\Common Files\Microsoft Shared\EQUATION\EQNEDT32.EXE";
|
||||
System.IO.FileInfo fi = new System.IO.FileInfo(folderPath);
|
||||
if (fi.Exists) return fi.FullName;
|
||||
folderPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles).Replace(" (x86)", "");
|
||||
folderPath += @"\Common Files\Microsoft Shared\EQUATION\EQNEDT32.EXE";
|
||||
fi = new System.IO.FileInfo(folderPath);
|
||||
if (fi.Exists) return fi.FullName;
|
||||
folderPath = @"C:\Program Files\Common Files\Microsoft Shared\EQUATION\EQNEDT32.EXE";
|
||||
fi = new System.IO.FileInfo(folderPath);
|
||||
if (fi.Exists) return fi.FullName;
|
||||
return null;
|
||||
}
|
||||
return retval;
|
||||
|
Loading…
x
Reference in New Issue
Block a user