B2025-034-Add-error-message-documents
This commit is contained in:
parent
80f3568dbd
commit
2e68218cfe
@ -10,6 +10,7 @@ using Volian.Controls.Library;
|
|||||||
using DevComponents.DotNetBar;
|
using DevComponents.DotNetBar;
|
||||||
using JR.Utils.GUI.Forms;
|
using JR.Utils.GUI.Forms;
|
||||||
using Volian.Base.Library;
|
using Volian.Base.Library;
|
||||||
|
using Microsoft.Win32;
|
||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
@ -658,11 +659,34 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
else // Otherwise open it in the Word editor
|
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
|
// B2025-034 Check to make sure that EDWord is installed in PROMS. If not return NULL.
|
||||||
return OpenDSOTabPage(myItemInfo);
|
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)
|
public bool PasteRTBItem(ItemInfo myItemInfo, int copyStartID, ItemInfo.EAddpingPart pasteType, int type)
|
||||||
{
|
{
|
||||||
CleanUpClosedItems();
|
CleanUpClosedItems();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user