C2025-023 Bringing branch up to date to resolve merge conflicts
This commit is contained in:
@@ -897,11 +897,7 @@ namespace Volian.Controls.Library
|
||||
// B2023-072: Don't crash if annotation type was deleted for the restore annotation
|
||||
if (ai == null)
|
||||
{
|
||||
AnnotationTypeInfo ati = AnnotationTypeInfo.Get(aai.TypeID);
|
||||
if (ati == null)
|
||||
{
|
||||
FlexibleMessageBox.Show(this, "Annotation Type was deleted, cannot restore Annotation Type\r\nCopy text from window in Change Details and paste into new annotation to restore the text.", "Annotation Type Deleted", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
FlexibleMessageBox.Show(this, "Annotation Type was deleted, cannot restore Annotation Type\r\nCopy text from window in Change Details and paste into new annotation to restore the text.", "Annotation Type Deleted", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
OnAnnotationRestored(ai, ai.MyItem);
|
||||
|
@@ -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,35 @@ 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 device. " + Environment.NewLine + "" + Environment.NewLine +
|
||||
"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();
|
||||
|
@@ -97,21 +97,6 @@ namespace Volian.Controls.Library
|
||||
set { if (Visible != value) Visible = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Expose text properties for height and widht to handle selecting RO Image Types.
|
||||
/// </summary>
|
||||
public string TbFSwd
|
||||
{
|
||||
get {return tbFSWd.Text;}
|
||||
set { tbFSWd.Text = value; tbFSWd.Refresh(); } // trBarFS.Value = Convert.ToInt32(value);
|
||||
}
|
||||
|
||||
public string TbFSht
|
||||
{
|
||||
get { return tbFSHt.Text; }
|
||||
set { tbFSHt.Text = value; tbFSHt.Refresh(); _origFigureSizeRatio = float.Parse(value) / float.Parse(tbFSWd.Text); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region Constructor
|
||||
public DisplayTags()
|
||||
@@ -172,6 +157,18 @@ namespace Volian.Controls.Library
|
||||
tbFSWd.SelectionLength = 0;
|
||||
tbFSWd.SelectionStart = tbFSWd.TextLength; // position to the end of the Width text box
|
||||
}
|
||||
/// <summary>
|
||||
/// Update text properties for height and width for new RO Image Types.
|
||||
/// </summary>
|
||||
public void SetNewImageHeightAndWidth(int height, int width)
|
||||
{
|
||||
tbFSHt.Text = height.ToString();
|
||||
tbFSWd.Text = width.ToString();
|
||||
tbFSWd.Refresh();
|
||||
tbFSHt.Refresh();
|
||||
_origFigureSizeWidth = width;
|
||||
_origFigureSizeRatio = (float)height / (float)width;
|
||||
}
|
||||
public void ToggleChangeBar() // for use with shortcut keystoke <ALT><F2>
|
||||
{
|
||||
if (rbChgBarOff.Checked)
|
||||
|
@@ -758,7 +758,7 @@ namespace Volian.Controls.Library
|
||||
// clear tabs, clears then all so that next 'get' will calculate new.
|
||||
public void SetAllTabs()
|
||||
{
|
||||
RefreshTab();
|
||||
RefreshTab();
|
||||
|
||||
if (_MyAfterEditItems != null) _MyAfterEditItems[0].SetAllTabs(); // B2020-043: used to loop through all, but then recursion would redo.
|
||||
if (_MyNextEditItem != null) _MyNextEditItem.SetAllTabs();
|
||||
@@ -1160,7 +1160,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (myItemInfoList != null)
|
||||
foreach (ItemInfo item in myItemInfoList)
|
||||
AddChildBefore(item, expand);
|
||||
AddChildBefore(item, expand);
|
||||
}
|
||||
public EditItem AddChildBefore(ItemInfoList myItemInfoList, EditItem nextEditItem)
|
||||
{
|
||||
@@ -3994,7 +3994,8 @@ namespace Volian.Controls.Library
|
||||
// TODO: Adjust top based upon format
|
||||
// TODO: Remove Label and just output ident on the paint event
|
||||
TabLeft = 20;
|
||||
SetupHeader(itemInfo);
|
||||
if (!itemInfo.IsStep) // C2025-036 reduce un-needed processing - this will prevent duplicat calls that generate step tabs when loading a procedure
|
||||
SetupHeader(itemInfo);
|
||||
SetupAlarmTableView(itemInfo); // C2021-018 display alarm point table information in the step editor (if the format flag is set)
|
||||
this.Paint += new PaintEventHandler(EditItem_Paint);
|
||||
this.BackColorChanged += new EventHandler(EditItem_BackColorChanged);
|
||||
|
@@ -340,9 +340,8 @@ namespace Volian.Controls.Library
|
||||
this.Height = MyPictureBox.Height + 10;
|
||||
if (_displayTags != null)
|
||||
{
|
||||
_displayTags._origFigureSizeWidth = wd;
|
||||
_displayTags.TbFSwd = wd.ToString();
|
||||
_displayTags.TbFSht = ht.ToString();
|
||||
// Set the Height and Width on the step properties page for the new image
|
||||
_displayTags.SetNewImageHeightAndWidth(ht, wd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3588,7 +3588,9 @@ namespace Volian.Controls.Library
|
||||
if (tmp.MyDisplayTabControl.MyCopyStep != null &&
|
||||
tmp.MyDisplayTabControl.MyCopyStep.ItemID == MyEditItem.MyItemInfo.ItemID)
|
||||
{
|
||||
if (FlexibleMessageBox.Show("Are you sure?\n\nIf you delete this step you will not able to paste it.\nYou should paste it before you delete it.", "Attempting to delete copied step.", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
|
||||
//B2025-031 - Improve wording for if attempting to delete copied section
|
||||
string stype = MyEditItem.MyItemInfo.IsSection ? "section" : "step";
|
||||
if (FlexibleMessageBox.Show($"Are you sure?\n\nIf you delete this {stype} you will not able to paste it.\nYou should paste it before you delete it.", $"Attempting to delete copied {stype}.", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
|
||||
clearCopyStep = true;
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user