B2022-088: Find Doc Ro button not working in Word Sections
B2022-089: Updating RO Crashes
This commit is contained in:
parent
b6d69fbd4c
commit
f8269a7ac6
@ -492,6 +492,48 @@ namespace LBWordLibrary
|
|||||||
public partial class LBRange : LBComObject
|
public partial class LBRange : LBComObject
|
||||||
{
|
{
|
||||||
public LBRange() { }
|
public LBRange() { }
|
||||||
|
|
||||||
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
public LBFind Find
|
||||||
|
{
|
||||||
|
get { return new LBFind(GetProperty("Find")); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int MoveStart()
|
||||||
|
{
|
||||||
|
return InvokeMethod("MoveStart", Missing.Value, Missing.Value) as int? ?? 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int MoveStart(object Unit, object Count)
|
||||||
|
{
|
||||||
|
return InvokeMethod("MoveStart", Unit, Count) as int? ?? 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int MoveEnd()
|
||||||
|
{
|
||||||
|
return InvokeMethod("MoveEnd", Missing.Value, Missing.Value) as int? ?? 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int MoveEnd(object Unit, object Count)
|
||||||
|
{
|
||||||
|
return InvokeMethod("MoveEnd", Unit, Count) as int? ?? 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertSymbol(int CharacterNumber)
|
||||||
|
{
|
||||||
|
InvokeMethod("InsertSymbol", CharacterNumber, Missing.Value, Missing.Value, Missing.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertSymbol(int CharacterNumber, object Font, object Unicode, object Bias)
|
||||||
|
{
|
||||||
|
InvokeMethod("InsertSymbol", CharacterNumber, Font, Unicode, Bias);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TypeText(string Text)
|
||||||
|
{
|
||||||
|
InvokeMethod("TypeText", Text);
|
||||||
|
}
|
||||||
|
|
||||||
public LBRange(Object item) : base(item) { }
|
public LBRange(Object item) : base(item) { }
|
||||||
// B2018-028 Word 2016 has a different value for the Vertical Position Relative to the Text Boundary than older version of Word.
|
// B2018-028 Word 2016 has a different value for the Vertical Position Relative to the Text Boundary than older version of Word.
|
||||||
// We now need to calculated the last row of text in the PROMS attachment differently.
|
// We now need to calculated the last row of text in the PROMS attachment differently.
|
||||||
|
@ -840,6 +840,25 @@ namespace LBWordLibrary
|
|||||||
{
|
{
|
||||||
return new LBRange(InvokeMethod("GoTo", What, Which, Count, Missing.Value));
|
return new LBRange(InvokeMethod("GoTo", What, Which, Count, Missing.Value));
|
||||||
}
|
}
|
||||||
|
B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
public bool LastWasUpper
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
int start = this.Start - 1;
|
||||||
|
|
||||||
|
while (start >= 0)
|
||||||
|
{
|
||||||
|
this.Start = start;
|
||||||
|
this.End = start + 1;
|
||||||
|
string previous = LBDocumentClass.GetRangeText(this);
|
||||||
|
if (Regex.IsMatch(previous, "[A-Z]")) return true;
|
||||||
|
if (Regex.IsMatch(previous, "[a-z]")) return false;
|
||||||
|
start = start - 1;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public partial class LBSelection : LBComObject
|
public partial class LBSelection : LBComObject
|
||||||
{
|
{
|
||||||
|
@ -735,12 +735,12 @@ namespace VEPROMS
|
|||||||
// This is master/slave & a slave has been selected for printing (SelectedSlave > 0)
|
// This is master/slave & a slave has been selected for printing (SelectedSlave > 0)
|
||||||
if (SelectedSlave > 0)
|
if (SelectedSlave > 0)
|
||||||
{
|
{
|
||||||
bool includeProc = MyProcedure.ApplInclude(SelectedSlave); // C2021-027: Procedure level PC/PC
|
bool includeProc = MyProcedure.ApplInclude(SelectedSlave); // C2021-027: Procedure level PC/PC?
|
||||||
if (!includeProc) VlnSvgPageHelper.CountInApplProcs++; // B2021-127: BNPPalr - Auto set of serial #
|
if (!includeProc) VlnSvgPageHelper.CountInApplProcs++; // B2021-127: BNPPalr - Auto set of serial #
|
||||||
if (includeProc)
|
if (includeProc)
|
||||||
{
|
{
|
||||||
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = SelectedSlave;
|
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = SelectedSlave;
|
||||||
SetupForProcedure();
|
SetupForProcedure();?
|
||||||
//B2022-030 moved the watermark stuff after SetupForProcedure so that DisplayNumber is properly resolved and the proper unit watermark is found
|
//B2022-030 moved the watermark stuff after SetupForProcedure so that DisplayNumber is properly resolved and the proper unit watermark is found
|
||||||
// also moved the setting of override watermark to after SetUnitWatermark so that it truely overrrides
|
// also moved the setting of override watermark to after SetUnitWatermark so that it truely overrrides
|
||||||
frmPDFStatusForm.SetUnitWatermark(MyProcedure, ref waterMarkText, ref watermarkColor); //C2022-004 Unit Designator watermark // C2021-062 save the entered Rev Number to all of the procedures that are being printed
|
frmPDFStatusForm.SetUnitWatermark(MyProcedure, ref waterMarkText, ref watermarkColor); //C2022-004 Unit Designator watermark // C2021-062 save the entered Rev Number to all of the procedures that are being printed
|
||||||
@ -984,6 +984,11 @@ namespace VEPROMS
|
|||||||
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a"," | "));
|
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a"," | "));
|
||||||
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
||||||
|
|
||||||
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
// Initialize Print Cache
|
||||||
|
MSWordToPDF.RoPrintCache = new Dictionary<string, ROFSTLookup.rochild>();
|
||||||
|
|
||||||
|
|
||||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||||
ProfileTimer.Pop(profileDepth2);
|
ProfileTimer.Pop(profileDepth2);
|
||||||
// B2016-249 Output Procedure to folder associated with Parent Child
|
// B2016-249 Output Procedure to folder associated with Parent Child
|
||||||
@ -1000,6 +1005,13 @@ namespace VEPROMS
|
|||||||
frmStatus.ShowDialog();
|
frmStatus.ShowDialog();
|
||||||
ProfileTimer.Pop(profileDepth3);
|
ProfileTimer.Pop(profileDepth3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
// Cleanup Print Cache
|
||||||
|
MSWordToPDF.RoPrintCache.Clear();
|
||||||
|
MSWordToPDF.RoPrintCache = null;
|
||||||
|
|
||||||
|
|
||||||
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
this.Close();
|
this.Close();
|
||||||
ShowDebugFiles();
|
ShowDebugFiles();
|
||||||
|
@ -4086,16 +4086,19 @@ namespace VEPROMS
|
|||||||
//}
|
//}
|
||||||
_DidConvertROsToText |= true;
|
_DidConvertROsToText |= true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool _DidProcessROs = false; // B2017-076 flag that ROs where processed
|
private bool _DidProcessROs = false; // B2017-076 flag that ROs where processed
|
||||||
private void AddROUsages(Content content, XmlNode xn)
|
private void AddROUsages(Content content, XmlNode xn)
|
||||||
{
|
{
|
||||||
AddROUsages(content, xn, false);
|
AddROUsages(content, xn, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// part of bug fix B2017-060 added the isGrid parameter
|
// part of bug fix B2017-060 added the isGrid parameter
|
||||||
private void AddROUsages(Content content, XmlNode xn, bool isGrid)
|
private void AddROUsages(Content content, XmlNode xn, bool isGrid)
|
||||||
{
|
{
|
||||||
if (_ImportingApprovedExportFile) return; //B2020-095 the links are already removed from the import file
|
if (_ImportingApprovedExportFile) return; //B2020-095 the links are already removed from the import file
|
||||||
_DidProcessROs = false;
|
_DidProcessROs = false;
|
||||||
|
|
||||||
if (_ConvertROsToTextDuringImport)
|
if (_ConvertROsToTextDuringImport)
|
||||||
ConvertImportProcedureROsToText(content, xn);
|
ConvertImportProcedureROsToText(content, xn);
|
||||||
else
|
else
|
||||||
@ -4113,7 +4116,15 @@ namespace VEPROMS
|
|||||||
|
|
||||||
ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion);
|
ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion);
|
||||||
|
|
||||||
string roval = lookup.GetRoValue(roid);
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
string roidBase = string.Empty;
|
||||||
|
string roidExt = string.Empty;
|
||||||
|
|
||||||
|
string roid16 = ROFSTLookup.FormatRoidKey(roid, ref roidBase, ref roidExt, true);
|
||||||
|
ROFSTLookup.rochild roc = lookup.GetRoChild(roid16);
|
||||||
|
|
||||||
|
string roval = roc.value;
|
||||||
|
//string roval = (roc.ID < 0 || string.IsNullOrEmpty(roc.value)) ? "?" : roc.value;
|
||||||
|
|
||||||
if (roval == "?")
|
if (roval == "?")
|
||||||
{
|
{
|
||||||
|
@ -137,6 +137,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
private int _selectedSlave;
|
private int _selectedSlave;
|
||||||
private string _otherChild = string.Empty;
|
private string _otherChild = string.Empty;
|
||||||
|
|
||||||
|
private bool _autoCombineSingleRetValues = true;
|
||||||
|
|
||||||
private List<string> _lstRoValues;
|
private List<string> _lstRoValues;
|
||||||
private List<string> _multiRoValues;
|
private List<string> _multiRoValues;
|
||||||
private Dictionary<string, string> _dicRoVars;
|
private Dictionary<string, string> _dicRoVars;
|
||||||
@ -195,6 +197,13 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool AutoCombineSingleRetValues
|
||||||
|
{
|
||||||
|
get { return _autoCombineSingleRetValues; }
|
||||||
|
set { _autoCombineSingleRetValues = value; }
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
@ -293,6 +302,35 @@ namespace VEPROMS.CSLA.Library
|
|||||||
|
|
||||||
#region (RO Info By AccPageID)
|
#region (RO Info By AccPageID)
|
||||||
|
|
||||||
|
public string FormatAccPageKey(string accPageID)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(accPageID))
|
||||||
|
return accPageID;
|
||||||
|
|
||||||
|
string spDefault = (MyDocVersionInfo != null && MyDocVersionInfo.DocVersionConfig != null) ? MyDocVersionInfo.DocVersionConfig.RODefaults_setpointprefix : string.Empty;
|
||||||
|
string igDefault = (MyDocVersionInfo != null && MyDocVersionInfo.DocVersionConfig != null) ? MyDocVersionInfo.DocVersionConfig.RODefaults_graphicsprefix : string.Empty;
|
||||||
|
|
||||||
|
return FormatAccPageKey(accPageID, spDefault, igDefault);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string FormatAccPageKey(string accPageID, ref string accPageBase, ref string accPageExt, bool useDefaultExt = true)
|
||||||
|
{
|
||||||
|
string accPageKey = FormatAccPageKey(accPageID);
|
||||||
|
|
||||||
|
if (Regex.IsMatch(accPageKey, @".*\.[A-Z]"))
|
||||||
|
{
|
||||||
|
accPageBase = accPageKey.Substring(0, accPageKey.Length - 2);
|
||||||
|
accPageExt = Convert.ToString(accPageKey.ToCharArray().LastOrDefault());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
accPageBase = accPageKey;
|
||||||
|
accPageExt = (!accPageKey.StartsWith("<U-") && useDefaultExt) ? "A" : string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return accPageKey;
|
||||||
|
}
|
||||||
|
|
||||||
public static string FormatAccPageKey(string accPageID, string spDefault, string igDefault)
|
public static string FormatAccPageKey(string accPageID, string spDefault, string igDefault)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(accPageID))
|
if (!string.IsNullOrEmpty(accPageID))
|
||||||
@ -305,7 +343,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (!accPageID.EndsWith(">"))
|
if (!accPageID.EndsWith(">"))
|
||||||
accPageID = string.Format("{0}>", accPageID);
|
accPageID = string.Format("{0}>", accPageID);
|
||||||
|
|
||||||
accPageID = accPageID.Replace("<U>", "<U-ID>");
|
accPageID = accPageID.Replace("<U>", "<U-NUMBER>");
|
||||||
accPageID = accPageID.ToCleanString(); // Removes any spaces
|
accPageID = accPageID.ToCleanString(); // Removes any spaces
|
||||||
|
|
||||||
// Clean up the AccPageID before using it to do a lookup
|
// Clean up the AccPageID before using it to do a lookup
|
||||||
@ -344,13 +382,22 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return accPageKey;
|
return accPageKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ROFSTLookup.rochild GetROChildByAccPageID(string accPageID)
|
||||||
|
{
|
||||||
|
string spDefault = (MyDocVersionInfo != null && MyDocVersionInfo.DocVersionConfig != null) ? MyDocVersionInfo.DocVersionConfig.RODefaults_setpointprefix : string.Empty;
|
||||||
|
string igDefault = (MyDocVersionInfo != null && MyDocVersionInfo.DocVersionConfig != null) ? MyDocVersionInfo.DocVersionConfig.RODefaults_graphicsprefix : string.Empty;
|
||||||
|
|
||||||
|
return GetROChildByAccPageID(accPageID, spDefault, igDefault);
|
||||||
|
}
|
||||||
|
|
||||||
public ROFSTLookup.rochild GetROChildByAccPageID(string accPageID, string spDefault, string igDefault)
|
public ROFSTLookup.rochild GetROChildByAccPageID(string accPageID, string spDefault, string igDefault)
|
||||||
{
|
{
|
||||||
|
// Cleanup accPageID if necessary [Note* This will also handle any UnitInfo Ro Values (ex: "<U-NUMBER>")]
|
||||||
string accPageKey = FormatAccPageKey(accPageID, spDefault, igDefault);
|
string accPageKey = FormatAccPageKey(accPageID, spDefault, igDefault);
|
||||||
|
|
||||||
ROFSTLookup.rochild rc = RofstDataGetChildByAccPageID(_rofstID, accPageID, spDefault, igDefault);
|
ROFSTLookup.rochild rc = RofstDataGetChildByAccPageID(_rofstID, accPageID, spDefault, igDefault);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(rc.roid) && Regex.IsMatch(accPageKey, @".*\.[A-Z]") && rc.children != null && rc.children.Count() > 0)
|
if (!string.IsNullOrEmpty(rc.roid) && rc.roid.Length < 16 && Regex.IsMatch(accPageKey, @".*\.[A-Z]") && rc.children != null && rc.children.Count() > 0)
|
||||||
{
|
{
|
||||||
// Check if AccPageID/Key has a return value specific extension. Try to find the RoChild record with the specific return value type,
|
// Check if AccPageID/Key has a return value specific extension. Try to find the RoChild record with the specific return value type,
|
||||||
// If not found Or the specific extension value is (Null or Empty), then just return the first/default return value type in the list of children
|
// If not found Or the specific extension value is (Null or Empty), then just return the first/default return value type in the list of children
|
||||||
@ -372,12 +419,19 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (!string.IsNullOrEmpty(roid))
|
if (!string.IsNullOrEmpty(roid))
|
||||||
{
|
{
|
||||||
roid = roid.ToUpper();
|
roid = roid.ToUpper();
|
||||||
roid = roid.Replace("<U>", "<U-ID>");
|
roid = roid.Replace("<U>", "<U-NUMBER>");
|
||||||
roid = roid.ToCleanString(); // Removes any spaces
|
roid = roid.ToCleanString(); // Removes any spaces
|
||||||
|
|
||||||
if ((!roid.StartsWith("<U-")) && ((roid.Length == 16 && roid.EndsWith("0000")) || (check16Digits && roid.Length < 16)))
|
if ((!roid.StartsWith("<U-")) && ((roid.Length == 16 && roid.EndsWith("0000")) || (check16Digits && roid.Length < 16)))
|
||||||
{
|
{
|
||||||
roid = string.Format("{0}0041", roid.Substring(0, 12));
|
// Pad roid with zeros to ensure the minimum length of any roid is (12) digits.
|
||||||
|
// This fixes any roids that are less than (12) digits or ones that have (16) digits and end with the older "0000" default ext.
|
||||||
|
// The default extension for any RoChild return value is now "0041", which is always the first RoChild Return Value object in the "Childrens" collection for
|
||||||
|
// the RO Base Object and is also used as the Default Return Value if the specified extension specific return value doesn't exist or has been deleted.
|
||||||
|
// This applies to all RoChild Return Values (Single / Multiple / Unit Info Tags)
|
||||||
|
// [Example: Unit Info Roid(12) "FFFF00000002" ==> "FFFF000000020041"]
|
||||||
|
|
||||||
|
roid = string.Format("{0}00000000", roid).Substring(0, 12) + "0041";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -403,12 +457,12 @@ namespace VEPROMS.CSLA.Library
|
|||||||
|
|
||||||
public ROFSTLookup.rochild GetRoChild(string roid, bool loadChildren = false, bool loadAllChildren = false)
|
public ROFSTLookup.rochild GetRoChild(string roid, bool loadChildren = false, bool loadAllChildren = false)
|
||||||
{
|
{
|
||||||
// Cleanup Roid if necessary (Note* This method also handles the UnitInfo Ro Values. ex: "<U-NUMBER>")
|
// Cleanup roid if necessary [Note* This will also handle any UnitInfo Ro Values (ex: "<U-NUMBER>")]
|
||||||
roid = FormatRoidKey(roid);
|
roid = FormatRoidKey(roid);
|
||||||
|
|
||||||
ROFSTLookup.rochild rc = GetRoChild12(roid, loadChildren, loadAllChildren);
|
ROFSTLookup.rochild rc = GetRoChild12(roid, loadChildren, loadAllChildren);
|
||||||
|
|
||||||
if (!roid.StartsWith("FFFF") && roid.Length == 16 && rc.children != null && rc.children.Length > 0)
|
if (!roid.StartsWith("FFFF") && rc.children != null && rc.children.Length > 0 && roid.Length == 16)
|
||||||
{
|
{
|
||||||
// If specific match exists for multi-return values, then return specified value, otherwise default to the first child
|
// If specific match exists for multi-return values, then return specified value, otherwise default to the first child
|
||||||
if (rc.children.Where(x => x.roid.ToUpper() == roid.ToUpper()).Any())
|
if (rc.children.Where(x => x.roid.ToUpper() == roid.ToUpper()).Any())
|
||||||
@ -420,18 +474,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public string GetRoValue(string roid)
|
|
||||||
{
|
|
||||||
return GetRoChild(roid).value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetTranslatedRoValue(string roid, bool DoCaret, bool DoDOSSuperSubScript)
|
public string GetTranslatedRoValue(string roid, bool DoCaret, bool DoDOSSuperSubScript)
|
||||||
{
|
{
|
||||||
roid = FormatRoidKey(roid);
|
roid = FormatRoidKey(roid);
|
||||||
|
|
||||||
string retval = GetRoValue(roid);
|
string retval = GetRoChild(roid).value;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(retval))
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
retval = ReplaceUnicode(retval, DoCaret);
|
retval = ReplaceUnicode(retval, DoCaret);
|
||||||
retval = ConvertFortranFormatToScienctificNotation(retval);
|
retval = ConvertFortranFormatToScienctificNotation(retval);
|
||||||
|
|
||||||
@ -446,41 +497,6 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return (!string.IsNullOrEmpty(retval)) ? retval.Replace("\r\n", @"\par ") : retval;
|
return (!string.IsNullOrEmpty(retval)) ? retval.Replace("\r\n", @"\par ") : retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetParentChildDefaultValue(string roval)
|
|
||||||
{
|
|
||||||
var test = GetParentChildROValue(roval, 0);
|
|
||||||
|
|
||||||
// C2021-026 Get the Parent (Default) RO value if the return value include P/C information otherwise return the RO value as is.
|
|
||||||
// This is used for the insert RO interface on the Step Properties panel
|
|
||||||
if (string.IsNullOrEmpty(roval))
|
|
||||||
return null;
|
|
||||||
|
|
||||||
|
|
||||||
string rntval = roval.Replace("\xFF", "\xa0").Replace(@"\u160?", " ");
|
|
||||||
|
|
||||||
while (rntval.Contains("<APL DefaultVal=")) // C2021-026 remove Parent/Child values for the menu item text
|
|
||||||
{
|
|
||||||
int startCVIdx = rntval.IndexOf("<APL DefaultVal=");
|
|
||||||
int EndCVidx = rntval.IndexOf(" /APL>", startCVIdx);
|
|
||||||
string aplicValues = rntval.Substring(startCVIdx, EndCVidx + 6 - startCVIdx);
|
|
||||||
int endDefIdx = rntval.IndexOf(",", startCVIdx);
|
|
||||||
|
|
||||||
// C2022-001 - handle if there is no child value in the RO FSt
|
|
||||||
// B2022-051 - was sometimes leaving "/APL>" when processing return value made up from multiple RO (editor) fields
|
|
||||||
// added check to make where next found comma was within the current <APL ... /APL>
|
|
||||||
string defValue = rntval.Substring(startCVIdx + 16, ((endDefIdx > 0 && endDefIdx < EndCVidx) ? endDefIdx : EndCVidx) - (startCVIdx + 16));
|
|
||||||
rntval = rntval.Replace(aplicValues, defValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
rntval = rntval.Trim();
|
|
||||||
|
|
||||||
// If Default Value is selected (selChldIdx = 0), and return value is empty then replace with Standard Missing Default Value
|
|
||||||
return (string.IsNullOrEmpty(rntval)) ? ROFSTLookup.RoMissingDefaultValue : rntval;
|
|
||||||
//return rntval;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<string> GetValueDifferences(int originalRofstID, ref List<string> delList)
|
public List<string> GetValueDifferences(int originalRofstID, ref List<string> delList)
|
||||||
{
|
{
|
||||||
return RofstDataGetValueDifferences(originalRofstID, _rofstID, ref delList);
|
return RofstDataGetValueDifferences(originalRofstID, _rofstID, ref delList);
|
||||||
@ -1087,6 +1103,11 @@ namespace VEPROMS.CSLA.Library
|
|||||||
|
|
||||||
private Dictionary<string, string> RofstDataSearch(int rofstID, string value, int searchTypeID, bool onlyRoid16, int? maxNumRecords)
|
private Dictionary<string, string> RofstDataSearch(int rofstID, string value, int searchTypeID, bool onlyRoid16, int? maxNumRecords)
|
||||||
{
|
{
|
||||||
|
// Currently, the RO Value Search only uses the default values for each of the (16) digit Ext Specific RO Return Values
|
||||||
|
// The defaults for each (16) digit Ext Specific RO Return Value are stored separately in the [RofstDefaultValue] table so they can be indexed / optimized
|
||||||
|
// for performance. In the future, the search can easily be modified to also include all unit specific return values as well. All we need to do is
|
||||||
|
// add a new table [RofstReturnValue] in the database to hold all of the different extension specific return values for each unit when applicable.
|
||||||
|
// All of the records in the [RofstReturnValue] will have a Foreign Key reference back to their RO Child Base objects in the [RofstChild] table.
|
||||||
Dictionary<string, string> dic = new Dictionary<string, string>();
|
Dictionary<string, string> dic = new Dictionary<string, string>();
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(value))
|
if (string.IsNullOrEmpty(value))
|
||||||
@ -1508,13 +1529,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
rc.title = (string)dr.GetValue("title");
|
rc.title = (string)dr.GetValue("title");
|
||||||
rc.roid = (string)dr.GetValue("roid");
|
rc.roid = (string)dr.GetValue("roid");
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty((string)dr.GetValue("appid")))
|
if (!string.IsNullOrEmpty((string)dr.GetValue("appid")))
|
||||||
rc.appid = (string)dr.GetValue("appid");
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty((string)dr.GetValue("value")))
|
|
||||||
{
|
{
|
||||||
rc.value = (string)dr.GetValue("value");
|
rc.appid = (string)dr.GetValue("AccPageID");
|
||||||
ProcessROReturnValue(ref rc, rc.value, GetRODatabaseTitleIndex(rc.roid));
|
|
||||||
|
if (!string.IsNullOrEmpty((string)dr.GetValue("value")))
|
||||||
|
{
|
||||||
|
rc.value = (string)dr.GetValue("value");
|
||||||
|
ProcessROReturnValue(ref rc, rc.value, GetRODatabaseTitleIndex(rc.roid));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (loadChildren || loadAllChildren)
|
else if (loadChildren || loadAllChildren)
|
||||||
{
|
{
|
||||||
@ -1561,6 +1584,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
child.children = new ROFSTLookup.rochild[lstValues.Count];
|
child.children = new ROFSTLookup.rochild[lstValues.Count];
|
||||||
|
|
||||||
|
// Load all extension specific return values (1 to many)
|
||||||
for (int i = 0; i < lstValues.Count; i++)
|
for (int i = 0; i < lstValues.Count; i++)
|
||||||
{
|
{
|
||||||
var roExt = Extensions.Where(x => x.Offset.Equals(i + 1)).SingleOrDefault();
|
var roExt = Extensions.Where(x => x.Offset.Equals(i + 1)).SingleOrDefault();
|
||||||
@ -1577,7 +1601,23 @@ namespace VEPROMS.CSLA.Library
|
|||||||
child.children[i].children = new List<ROFSTLookup.rochild>().ToArray();
|
child.children[i].children = new List<ROFSTLookup.rochild>().ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
child.value = null;
|
|
||||||
|
if (AutoCombineSingleRetValues && lstValues.Count == 1)
|
||||||
|
{
|
||||||
|
// When the RO object only has only return value and the "AutoCombineSingleRetValues" is set to True.
|
||||||
|
// Instead of returning the RoChildBase object with a single RoReturnVal object attached, just return the single Ro ReturnValue object.
|
||||||
|
var roRetVal = child.children.First();
|
||||||
|
|
||||||
|
//child.title = roRetVal.title;
|
||||||
|
child.appid = roRetVal.appid;
|
||||||
|
child.roid = roRetVal.roid;
|
||||||
|
child.value = roRetVal.value;
|
||||||
|
child.children = new List<ROFSTLookup.rochild>().ToArray();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
child.value = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_lstRoValues.Clear();
|
_lstRoValues.Clear();
|
||||||
@ -1645,7 +1685,6 @@ namespace VEPROMS.CSLA.Library
|
|||||||
|
|
||||||
// If Default Value is selected (selChldIdx = 0), and return value is empty then replace with Standard Missing Default Value
|
// If Default Value is selected (selChldIdx = 0), and return value is empty then replace with Standard Missing Default Value
|
||||||
return (selChldIdx == 0 && sb.ToString().Trim().Length <= 0) ? ROFSTLookup.RoMissingDefaultValue : sb.ToString().Trim();
|
return (selChldIdx == 0 && sb.ToString().Trim().Length <= 0) ? ROFSTLookup.RoMissingDefaultValue : sb.ToString().Trim();
|
||||||
//return sb.ToString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<string> GetROReturnValue(string roval)
|
private List<string> GetROReturnValue(string roval)
|
||||||
@ -1888,7 +1927,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
|
|
||||||
private string ReplaceUnicode(string s2, bool DoCaret)
|
private string ReplaceUnicode(string s2, bool DoCaret)
|
||||||
{
|
{
|
||||||
string orig = s2;
|
if (string.IsNullOrEmpty(s2))
|
||||||
|
return s2;
|
||||||
|
|
||||||
s2 = s2.Replace(@"\u160?", "<HSP>"); // convert hard spaces bug fix: B2016-206
|
s2 = s2.Replace(@"\u160?", "<HSP>"); // convert hard spaces bug fix: B2016-206
|
||||||
s2 = s2.Replace(@"\", @"\u9586?"); // convert backslashes to a backslash symbol
|
s2 = s2.Replace(@"\", @"\u9586?"); // convert backslashes to a backslash symbol
|
||||||
@ -1935,9 +1975,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
s2 = s2.Replace("\xD6", @"\u8595?"); // Down Arrow
|
s2 = s2.Replace("\xD6", @"\u8595?"); // Down Arrow
|
||||||
|
|
||||||
if (DoCaret) s2 = s2.Replace("^", @"\u916?");
|
if (DoCaret) s2 = s2.Replace("^", @"\u916?");
|
||||||
// Convert dash to a non-breaking dash. This is a unicode character.
|
|
||||||
// This character will be used in veproms rather than a dash.
|
// Convert dash to a non-breaking dash. This is a Unicode character.
|
||||||
//if the dash is preceeded byte a token remove the space following the token
|
// This character will be used in PROMS rather than a dash.
|
||||||
|
// if the dash is proceeded byte a token remove the space following the token
|
||||||
s2 = Regex.Replace(s2, @"(\\[^ \\?]*) \-", @"$1\u8209?");
|
s2 = Regex.Replace(s2, @"(\\[^ \\?]*) \-", @"$1\u8209?");
|
||||||
s2 = s2.Replace("-", @"\u8209?");
|
s2 = s2.Replace("-", @"\u8209?");
|
||||||
|
|
||||||
|
@ -1617,7 +1617,9 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
RoUsageInfo rou = RoUsageInfo.Get(ro.ROUsageID);
|
RoUsageInfo rou = RoUsageInfo.Get(ro.ROUsageID);
|
||||||
string myvalue = mylookup.GetTranslatedRoValue(rou.ROID, tmp.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, tmp.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues);
|
string myvalue = mylookup.GetTranslatedRoValue(rou.ROID, tmp.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, tmp.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues);
|
||||||
|
|
||||||
ROFSTLookup.rochild rocc = mylookup.GetRoChild(rou.ROID);
|
ROFSTLookup.rochild rocc = mylookup.GetRoChild(rou.ROID);
|
||||||
|
|
||||||
int mytype = rocc.type;
|
int mytype = rocc.type;
|
||||||
cont.FixContentText(rou, myvalue, mytype, myRoFst);
|
cont.FixContentText(rou, myvalue, mytype, myRoFst);
|
||||||
}
|
}
|
||||||
|
@ -783,7 +783,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// 5) If a specific RoChild return value does not exist (maybe it was removed in the ROEditor / latest RO.FST file), then just return
|
// 5) If a specific RoChild return value does not exist (maybe it was removed in the ROEditor / latest RO.FST file), then just return
|
||||||
// the first RoChild return value in the "children" collection (0041) instead
|
// the first RoChild return value in the "children" collection (0041) instead
|
||||||
|
|
||||||
private static Dictionary<string, ROFSTLookup.rochild> _roPrintCache = new Dictionary<string, ROFSTLookup.rochild>();
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
public static Dictionary<string, ROFSTLookup.rochild> RoPrintCache = new Dictionary<string, ROFSTLookup.rochild>();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -1154,9 +1155,6 @@ namespace VEPROMS.CSLA.Library
|
|||||||
|
|
||||||
int lastStart = sel == null ? 0 : sel.Start;
|
int lastStart = sel == null ? 0 : sel.Start;
|
||||||
|
|
||||||
// Cache RO Values while printing for performance increase
|
|
||||||
_roPrintCache = new Dictionary<string, ROFSTLookup.rochild>();
|
|
||||||
|
|
||||||
while (sel != null)
|
while (sel != null)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(sel.Text))
|
if (!string.IsNullOrEmpty(sel.Text))
|
||||||
@ -1335,10 +1333,6 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable/Clear RO Cache When done looking up RO Values during printing
|
|
||||||
_roPrintCache.Clear();
|
|
||||||
_roPrintCache = null;
|
|
||||||
|
|
||||||
if (statusChange != null) statusChange(VolianStatusType.Update, 0, "Creating PDF");
|
if (statusChange != null) statusChange(VolianStatusType.Update, 0, "Creating PDF");
|
||||||
sel = MyApp.Selection;
|
sel = MyApp.Selection;
|
||||||
sel.WholeStory();
|
sel.WholeStory();
|
||||||
@ -1398,7 +1392,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
string accPageKey = ROFSTLookup.FormatAccPageKey(selText, spPrefix, igPrefix, ref accPageBase, ref accPageExt, true);
|
string accPageKey = ROFSTLookup.FormatAccPageKey(selText, spPrefix, igPrefix, ref accPageBase, ref accPageExt, true);
|
||||||
|
|
||||||
// Check if the Rochild is in the PrintCache (use base accPageID without specific extension)
|
// Check if the Rochild is in the PrintCache (use base accPageID without specific extension)
|
||||||
if (!_roPrintCache.ContainsKey(accPageBase))
|
if (!RoPrintCache.ContainsKey(accPageBase))
|
||||||
{
|
{
|
||||||
// Lookup RoChild Info from database
|
// Lookup RoChild Info from database
|
||||||
roc = lookup.GetROChildByAccPageID(accPageBase, spPrefix, igPrefix);
|
roc = lookup.GetROChildByAccPageID(accPageBase, spPrefix, igPrefix);
|
||||||
@ -1408,11 +1402,11 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return ROFSTLookup.GetEmptyRoChild();
|
return ROFSTLookup.GetEmptyRoChild();
|
||||||
|
|
||||||
// If Valid Rochild, then add Rochild to Print Cache
|
// If Valid Rochild, then add Rochild to Print Cache
|
||||||
_roPrintCache.Add(accPageBase, roc);
|
RoPrintCache.Add(accPageBase, roc);
|
||||||
}
|
}
|
||||||
else // Get Base Rochild from Print Cache
|
else // Get Base Rochild from Print Cache
|
||||||
{
|
{
|
||||||
roc = (ROFSTLookup.rochild)_roPrintCache[accPageBase];
|
roc = (ROFSTLookup.rochild)RoPrintCache[accPageBase];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if RO is a "Unit Information" value (Ex: <U-ID>, etc..)
|
// Check if RO is a "Unit Information" value (Ex: <U-ID>, etc..)
|
||||||
|
@ -664,10 +664,12 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (activeRoids.Contains(chg.Substring(0, 12)))
|
if (activeRoids.Contains(chg.Substring(0, 12)))
|
||||||
{
|
{
|
||||||
ROFSTLookup.rochild roch = newLookup.GetRoChild(chg);
|
ROFSTLookup.rochild roch = newLookup.GetRoChild(chg);
|
||||||
string desc = string.Format("Change in RO Values: Old value = {0}, New value = {1}", origLookup.GetRoValue(chg), roch.value);
|
string desc = string.Format("Change in RO Values: Old value = {0}, New value = {1}", origLookup.GetRoChild(chg).value, roch.value);
|
||||||
|
|
||||||
// roid's are stored in database as 16 characters long in the RoUsages table. They may be stored as 12 characters in the ro.fst.
|
// roid's are stored in database as 16 characters long in the RoUsages table. They may be stored as 12 characters in the ro.fst.
|
||||||
string padroid = chg.Length <= 12 ? chg + "0000" : chg;
|
// string padroid = chg.Length <= 12 ? chg + "0000" : chg;
|
||||||
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
string padroid = ROFSTLookup.FormatRoidKey(chg, true);
|
||||||
|
|
||||||
using (RoUsageInfoList affected = RoUsageInfoList.GetAffected(origROFstInfo.MyRODb.RODbID, padroid, desc, "Changed", versionList))
|
using (RoUsageInfoList affected = RoUsageInfoList.GetAffected(origROFstInfo.MyRODb.RODbID, padroid, desc, "Changed", versionList))
|
||||||
{
|
{
|
||||||
@ -708,14 +710,17 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
foreach (string chg in chgList)
|
foreach (string chg in chgList)
|
||||||
{
|
{
|
||||||
string padroid = chg.Length <= 12 ? chg + "0000" : chg;
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
// string padroid = chg.Length <= 12 ? chg + "0000" : chg;
|
||||||
|
string padroid = ROFSTLookup.FormatRoidKey(chg, true);
|
||||||
|
|
||||||
if (myProgressBarRefresh != null) myProgressBarRefresh(++iCount, chgList.Count, "Updating RO Values");
|
if (myProgressBarRefresh != null) myProgressBarRefresh(++iCount, chgList.Count, "Updating RO Values");
|
||||||
|
|
||||||
if (activeDRoids.Contains(chg.Substring(0, 12)))
|
if (activeDRoids.Contains(chg.Substring(0, 12)))
|
||||||
{
|
{
|
||||||
ROFSTLookup.rochild roch = newLookup.GetRoChild(chg);
|
ROFSTLookup.rochild roch = newLookup.GetRoChild(chg);
|
||||||
|
|
||||||
string desc = string.Format("Change in RO Values: Old value = {0}, New value = {1}", origLookup.GetRoValue(chg), roch.value);
|
string desc = string.Format("Change in RO Values: Old value = {0}, New value = {1}", origLookup.GetRoChild(chg).value, roch.value);
|
||||||
|
|
||||||
// roid's are stored in database as 16 characters long in the rousages table. They may be stored as 12 characters in the ro.fst.
|
// roid's are stored in database as 16 characters long in the rousages table. They may be stored as 12 characters in the ro.fst.
|
||||||
using (DROUsageInfoList affected = DROUsageInfoList.GetAffected(origROFstInfo.MyRODb.RODbID, padroid, desc, "Changed", versionList))
|
using (DROUsageInfoList affected = DROUsageInfoList.GetAffected(origROFstInfo.MyRODb.RODbID, padroid, desc, "Changed", versionList))
|
||||||
@ -738,9 +743,12 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
foreach (string del in delList)
|
foreach (string del in delList)
|
||||||
{
|
{
|
||||||
string padroiddel = del.Length <= 12 ? del + "0000" : del;
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
//string padroiddel = del.Length <= 12 ? del + "0000" : del;
|
||||||
|
string padroiddel = ROFSTLookup.FormatRoidKey(del, true);
|
||||||
|
|
||||||
if (myProgressBarRefresh != null) myProgressBarRefresh(++iCount, chgList.Count, "Removing Old RO Values");
|
if (myProgressBarRefresh != null) myProgressBarRefresh(++iCount, chgList.Count, "Removing Old RO Values");
|
||||||
string desc = string.Format("Deleted RO: Value = {0}", origLookup.GetRoValue(del));
|
string desc = string.Format("Deleted RO: Value = {0}", origLookup.GetRoChild(del).value);
|
||||||
|
|
||||||
if (activeRoids.Contains(del.Substring(0, 12).ToUpper()))
|
if (activeRoids.Contains(del.Substring(0, 12).ToUpper()))
|
||||||
{
|
{
|
||||||
@ -773,8 +781,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
foreach (string del in delList)
|
foreach (string del in delList)
|
||||||
{
|
{
|
||||||
string padroiddel = del.Length <= 12 ? del + "0000" : del;
|
|
||||||
string desc = string.Format("Deleted RO: Value = {0}", origLookup.GetRoValue(del));
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
string padroiddel = ROFSTLookup.FormatRoidKey(del, true);
|
||||||
|
if (myProgressBarRefresh != null) myProgressBarRefresh(++iCount, chgList.Count, "Removing Old RO Values");
|
||||||
|
|
||||||
|
string desc = string.Format("Deleted RO: Value = {0}", origLookup.GetRoChild(del).value);
|
||||||
|
|
||||||
|
// If there's an issue then maybe try getting the RoChild with the Padded roid instead
|
||||||
|
//string desc = string.Format("Deleted RO: Value = {0}", origLookup.GetRoChild(padroiddel).value);
|
||||||
|
|
||||||
if (activeDRoids.Contains(del.Substring(0, 12).ToUpper()))
|
if (activeDRoids.Contains(del.Substring(0, 12).ToUpper()))
|
||||||
{
|
{
|
||||||
|
@ -930,6 +930,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
foreach (DROUsageInfo myRO in myList)
|
foreach (DROUsageInfo myRO in myList)
|
||||||
if (!myROIDs.Contains(myRO.ROID.ToUpper()))
|
if (!myROIDs.Contains(myRO.ROID.ToUpper()))
|
||||||
myROIDs.Add(myRO.ROID.ToUpper());
|
myROIDs.Add(myRO.ROID.ToUpper());
|
||||||
|
|
||||||
//create checkro record for each roid
|
//create checkro record for each roid
|
||||||
//_MyTimer.ActiveProcess = "Get DocVersionInfo";
|
//_MyTimer.ActiveProcess = "Get DocVersionInfo";
|
||||||
// DocVersionInfo dbi = proc.ActiveParent as DocVersionInfo;
|
// DocVersionInfo dbi = proc.ActiveParent as DocVersionInfo;
|
||||||
@ -942,8 +943,13 @@ namespace VEPROMS.CSLA.Library
|
|||||||
ROFSTLookup lookup = rofst.GetROFSTLookup(dvi);
|
ROFSTLookup lookup = rofst.GetROFSTLookup(dvi);
|
||||||
//_MyTimer.ActiveProcess = "Populating RevisionChecksXML table";
|
//_MyTimer.ActiveProcess = "Populating RevisionChecksXML table";
|
||||||
cc.ROConsistency.ROFstDate = rofst.DTS;
|
cc.ROConsistency.ROFstDate = rofst.DTS;
|
||||||
|
|
||||||
foreach (string s in myROIDs)
|
foreach (string s in myROIDs)
|
||||||
cc.AddROCheck(s, ItemInfo.ConvertToDisplayText(lookup.GetRoValue(s)));
|
{
|
||||||
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
cc.AddROCheck(s, ItemInfo.ConvertToDisplayText(((ROFSTLookup.rochild)lookup.GetRoChild(s)).value));
|
||||||
|
}
|
||||||
|
|
||||||
//_MyTimer.ActiveProcess = "External";
|
//_MyTimer.ActiveProcess = "External";
|
||||||
}
|
}
|
||||||
private static void BuildTransitionFromChecks(ConsistencyChecks cc, ProcedureInfo proc)
|
private static void BuildTransitionFromChecks(ConsistencyChecks cc, ProcedureInfo proc)
|
||||||
|
@ -311,7 +311,7 @@ namespace Volian.Controls.Library
|
|||||||
// Stop the timer
|
// Stop the timer
|
||||||
_searchTimer.Stop();
|
_searchTimer.Stop();
|
||||||
|
|
||||||
// Process RO Search
|
// Process RO Value Search
|
||||||
if (MyRTB != null && !MyRTB.IsDisposed)
|
if (MyRTB != null && !MyRTB.IsDisposed)
|
||||||
{
|
{
|
||||||
ProcessSearch(MyRTB.SelectedText, (int)ROFSTLookup.SearchTypes.StartsWith);
|
ProcessSearch(MyRTB.SelectedText, (int)ROFSTLookup.SearchTypes.StartsWith);
|
||||||
@ -475,10 +475,8 @@ namespace Volian.Controls.Library
|
|||||||
FlexibleMessageBox.Show(this, "Text must be selected in the document in order for an RO find to be performed.", "Select Text", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
FlexibleMessageBox.Show(this, "Text must be selected in the document in order for an RO find to be performed.", "Select Text", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
ProcessSearch(mytext, (int)ROFSTLookup.SearchTypes.StartsWith);
|
||||||
ProcessSearch(mytext, (int)ROFSTLookup.SearchTypes.StartsWith);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -868,7 +866,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
if (dti.MyDSOTabPanel != null) // A Word Document tab is the active tab
|
if (dti.MyDSOTabPanel != null) // A Word Document tab is the active tab
|
||||||
{
|
{
|
||||||
string accPageID = string.Format("<{0}>", roc.appid);
|
string accPageID = string.Format("<{0}>", roc.appid.ToUpper());
|
||||||
|
|
||||||
// Insert the RO text at the current cursor position in the word document
|
// Insert the RO text at the current cursor position in the word document
|
||||||
// NOTE: assuming any type of RO can be put in an Accessory (MSWord) Document
|
// NOTE: assuming any type of RO can be put in an Accessory (MSWord) Document
|
||||||
@ -881,7 +879,6 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
if (CheckROSelection(roc)) // check for RO type is valid for this type of step/substep
|
if (CheckROSelection(roc)) // check for RO type is valid for this type of step/substep
|
||||||
{
|
{
|
||||||
// the roid may be 12 or 16 chars long, with the last 4 set if there is unit specific value
|
|
||||||
// Pad to 16 to store in the RoUsage table.
|
// Pad to 16 to store in the RoUsage table.
|
||||||
string padroid = ROFSTLookup.FormatRoidKey(roc.roid, true);
|
string padroid = ROFSTLookup.FormatRoidKey(roc.roid, true);
|
||||||
string linktxt = string.Format(@"#Link:ReferencedObject:<NewID> {0} {1}", padroid, MyROFST.RODbID);
|
string linktxt = string.Format(@"#Link:ReferencedObject:<NewID> {0} {1}", padroid, MyROFST.RODbID);
|
||||||
@ -1017,47 +1014,51 @@ namespace Volian.Controls.Library
|
|||||||
// tries to process a search while the main tab/procedure is closing
|
// tries to process a search while the main tab/procedure is closing
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!this.Enabled)
|
if (this.Enabled && !string.IsNullOrEmpty(searchValue))
|
||||||
searchValue = string.Empty;
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(searchValue))
|
|
||||||
{
|
{
|
||||||
Dictionary<string, string> dicRoVals = new Dictionary<string, string>();
|
Dictionary<string, string> dicRoVals = new Dictionary<string, string>();
|
||||||
searchValue = searchValue.Replace('\u2011', '-').Replace(@"\u9586?", @"\\");
|
searchValue = searchValue.Replace('\u2011', '-').Replace(@"\u9586?", @"\\");
|
||||||
|
|
||||||
if (_lastSearchValue != searchValue)
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
|
if (searchValue.StartsWith("<") && searchValue.EndsWith(">"))
|
||||||
{
|
{
|
||||||
if (MyROFST != null && searchValue.Length >= 2)
|
ROFSTLookup.rochild roc = MyROFSTLookup.GetROChildByAccPageID(searchValue);
|
||||||
{
|
if (roc.ID >= 0 && !string.IsNullOrEmpty(roc.value))
|
||||||
dicRoVals = MyROFSTLookup.Search(searchValue, searchTypeID, false, MaxNumSearchRecords);
|
dicRoVals.Add(roc.roid, roc.value);
|
||||||
}
|
}
|
||||||
|
else if (searchValue.Length >= 2 && searchValue != _lastSearchValue)
|
||||||
|
{
|
||||||
|
dicRoVals = MyROFSTLookup.Search(searchValue, searchTypeID, false, MaxNumSearchRecords);
|
||||||
|
}
|
||||||
|
|
||||||
if (dicRoVals != null && dicRoVals.Count > 0)
|
|
||||||
{
|
|
||||||
lbFound.SelectedValueChanged -= new EventHandler(lbFound_SelectedValueChanged);
|
|
||||||
|
|
||||||
lbFound.DataSource = new BindingSource(dicRoVals, null);
|
if (dicRoVals.Count > 0)
|
||||||
lbFound.ValueMember = "Key"; // roid
|
{
|
||||||
lbFound.DisplayMember = "Value"; // default value
|
lbFound.SelectedValueChanged -= new EventHandler(lbFound_SelectedValueChanged);
|
||||||
|
|
||||||
lbFound.SelectionMode = SelectionMode.One;
|
lbFound.DataSource = new BindingSource(dicRoVals, null);
|
||||||
lbFound.SelectedIndex = -1;
|
lbFound.ValueMember = "Key"; // roid
|
||||||
lbFound.Visible = true;
|
lbFound.DisplayMember = "Value"; // default value
|
||||||
|
|
||||||
lbFound.SelectedValueChanged += new EventHandler(lbFound_SelectedValueChanged);
|
lbFound.SelectionMode = SelectionMode.One;
|
||||||
|
lbFound.SelectedIndex = -1;
|
||||||
|
lbFound.Visible = true;
|
||||||
|
|
||||||
if (lbFound.Items != null && lbFound.Items.Count == 1)
|
lbFound.SelectedValueChanged += new EventHandler(lbFound_SelectedValueChanged);
|
||||||
lbFound.SelectedIndex = 0;
|
|
||||||
}
|
if (lbFound.Items != null && lbFound.Items.Count == 1)
|
||||||
else
|
lbFound.SelectedIndex = 0;
|
||||||
{
|
}
|
||||||
lbFound.DataSource = null;
|
else
|
||||||
lbFound.Visible = false;
|
{
|
||||||
}
|
searchValue = string.Empty;
|
||||||
|
lbFound.DataSource = null;
|
||||||
|
lbFound.Visible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
searchValue = string.Empty;
|
||||||
lbFound.DataSource = null;
|
lbFound.DataSource = null;
|
||||||
lbFound.Visible = false;
|
lbFound.Visible = false;
|
||||||
}
|
}
|
||||||
|
@ -513,8 +513,9 @@ namespace Volian.Controls.Library
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
string[] subs = m.Groups[3].Value.Split(" ".ToCharArray());
|
string[] subs = m.Groups[3].Value.Split(" ".ToCharArray());
|
||||||
val = lookup.GetRoValue(subs[1]);
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
if (val == null || val == "?") val = lookup.GetRoValue(subs[1].Substring(0, 12));
|
val = lookup.GetRoChild(subs[1]).value;
|
||||||
|
if (val == null || val == "?") val = lookup.GetRoChild(subs[1].Substring(0, 12)).value;
|
||||||
if (val == "?")
|
if (val == "?")
|
||||||
{
|
{
|
||||||
// Do 'empty' image box.
|
// Do 'empty' image box.
|
||||||
|
@ -342,8 +342,9 @@ namespace Volian.Print.Library
|
|||||||
ROFSTLookup.rochild rocc = lu.GetRoChild(roc.ROID);
|
ROFSTLookup.rochild rocc = lu.GetRoChild(roc.ROID);
|
||||||
if (rocc.type == 1)
|
if (rocc.type == 1)
|
||||||
{
|
{
|
||||||
string newROValue = lu.GetRoValue(roc.ROID).Replace('`', '\xb0');
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
string rotitle = string.Format("{0} - Current Version: {1}", lu.GetROTitle(roc.ROID), lu.GetRoValue(roc.ROID).Replace('`','\xb0'));
|
string newROValue = lu.GetRoChild(roc.ROID).value.Replace('`', '\xb0');
|
||||||
|
string rotitle = string.Format("{0} - Current Version: {1}", lu.GetROTitle(roc.ROID), lu.GetRoChild(roc.ROID).value.Replace('`','\xb0'));
|
||||||
if (ros.ContainsKey(rotitle))
|
if (ros.ContainsKey(rotitle))
|
||||||
{
|
{
|
||||||
// B2021-025: Add 'Approved' to message here and in line below to help clarify report info
|
// B2021-025: Add 'Approved' to message here and in line below to help clarify report info
|
||||||
|
@ -4049,8 +4049,9 @@ namespace Volian.Print.Library
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
string[] subs = m.Groups[3].Value.Split(" ".ToCharArray());
|
string[] subs = m.Groups[3].Value.Split(" ".ToCharArray());
|
||||||
val = lookup.GetRoValue(subs[1]);
|
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||||
if (val == null || val == "?") val = lookup.GetRoValue(subs[1].Substring(0, 12));
|
val = lookup.GetRoChild(subs[1]).value;
|
||||||
|
if (val == null || val == "?") val = lookup.GetRoChild(subs[1].Substring(0, 12)).value;
|
||||||
if (val == "?")
|
if (val == "?")
|
||||||
{
|
{
|
||||||
erMsg = string.Format("Referenced Object does not exist.");
|
erMsg = string.Format("Referenced Object does not exist.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user