B2025-034-Add-error-message-documents #567

Merged
jjenko merged 1 commits from B2025-034-Add-error-message-documents into Development 2025-06-11 08:42:45 -04:00

View File

@ -10,6 +10,7 @@ using Volian.Controls.Library;
using DevComponents.DotNetBar;
using JR.Utils.GUI.Forms;
using Volian.Base.Library;
using Microsoft.Win32;
namespace Volian.Controls.Library
{
@ -658,11 +659,34 @@ namespace Volian.Controls.Library
}
else // Otherwise open it in the Word editor
{
Document.ConvertWordSectionToDOCX(myItemInfo); // B2023-093 Convert a Word section to the DOCX Word format if needed before opening it for edit
return OpenDSOTabPage(myItemInfo);
}
}
// B2025-034 Check to make sure that EDWord is installed in PROMS. If not return NULL.
object EDOfficeViewerX = GetValue<object>(@"HKEY_CLASSES_ROOT\EDOfficeViewerX.Connect\CLSID\", @"", null);
object EDWordCtrl = GetValue<object>(@"HKEY_CLASSES_ROOT\EDWORD.EDWordCtrl.1\CLSID\", @"", null);
if (EDOfficeViewerX == null || EDWordCtrl == null)
{
MessageBox.Show("Edraw needs to be installed or reinstalled on this PC. Please contact your IT Administrator to install and register Edraw that was provided with the PROMS Installation media. If additional support is needed, please contact Volian", "Error in Word section",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return null;
}
else
{
Document.ConvertWordSectionToDOCX(myItemInfo); // B2023-093 Convert a Word section to the DOCX Word format if needed before opening it for edit
return OpenDSOTabPage(myItemInfo);
}
}
}
public T GetValue<T>(string registryKeyPath, string value, T defaultValue = default(T))
{
T retVal = default(T);
retVal = (T)Registry.GetValue(registryKeyPath, value, defaultValue);
return retVal;
}
public bool PasteRTBItem(ItemInfo myItemInfo, int copyStartID, ItemInfo.EAddpingPart pasteType, int type)
{
CleanUpClosedItems();