This commit is contained in:
parent
d9a79bfbda
commit
442198860c
@ -667,7 +667,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
string roid = lookup.GetROIDByAccPagID(sel.Text, spPrefix, igPrefix);
|
string roid = lookup.GetROIDByAccPagID(sel.Text, spPrefix, igPrefix);
|
||||||
if (roid != null)
|
if (roid != null)
|
||||||
{
|
{
|
||||||
string roidkey = string.Format("{0}:{1}",rofst.RODbID, roid);
|
string roidkey = string.Format("{0}:{1}", rofst.RODbID, roid);
|
||||||
if (!roids.Contains(roidkey))
|
if (!roids.Contains(roidkey))
|
||||||
roids.Add(roidkey);
|
roids.Add(roidkey);
|
||||||
}
|
}
|
||||||
@ -998,26 +998,44 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
private static LBSelection FindRO()
|
private static LBSelection FindRO()
|
||||||
{
|
{
|
||||||
LBSelection sel = MyApp.Selection;
|
int firstStart = 0;
|
||||||
LBFind find = sel.Find;
|
bool executeResult = false;
|
||||||
find.ClearFormatting();
|
LBSelection sel = null;
|
||||||
// Search string format - this is MSWord wildcard format
|
while (!executeResult)
|
||||||
// If you do a search in MSWord, make sure wildcard box is checked and then press the
|
{
|
||||||
// Special button to see the definitions of the various wildcards
|
sel = MyApp.Selection;
|
||||||
// [<] - Less-Than Character
|
LBFind find = sel.Find;
|
||||||
// [!<> ]@ - 1 or more characters not including Less-Than, Greater-Than or Space
|
find.ClearFormatting();
|
||||||
// - Dash
|
// Search string format - this is MSWord wildcard format
|
||||||
// [!<> ]@ - 1 or more characters not including Less-Than, Greater-Than or Space
|
// If you do a search in MSWord, make sure wildcard box is checked and then press the
|
||||||
// [>] - Greater-Than Character
|
// Special button to see the definitions of the various wildcards
|
||||||
find.Text = "[<][!<> ]@-[!<> ]@[>]";
|
// [<] - Less-Than Character
|
||||||
//find.Wrap = LBWdFindWrap.wdFindStop;
|
// [!<> ]@ - 1 or more characters not including Less-Than, Greater-Than or Space
|
||||||
find.Wrap = LBWdFindWrap.wdFindContinue;
|
// - Dash
|
||||||
find.MatchCase = false;
|
// [!<> ]@ - 1 or more characters not including Less-Than, Greater-Than or Space
|
||||||
find.MatchWholeWord = false;
|
// [>] - Greater-Than Character
|
||||||
find.MatchWildcards = true;
|
find.Text = "[<][!<> ]@-[!<> ]@[>]";
|
||||||
find.MatchSoundsLike = false;
|
find.Wrap = LBWdFindWrap.wdFindContinue;
|
||||||
find.MatchAllWordForms = false;
|
find.MatchCase = false;
|
||||||
if (find.Execute()) return sel;
|
find.MatchWholeWord = false;
|
||||||
|
find.MatchWildcards = true;
|
||||||
|
find.MatchSoundsLike = false;
|
||||||
|
find.MatchAllWordForms = false;
|
||||||
|
executeResult = find.Execute();
|
||||||
|
// MS Word found 'invalid' ro when text had "[335.0<T<335.6ºC]" (not sure what problem was).
|
||||||
|
// When this occurred, the selection was found, but it's end = 0, so move 1 char past it.
|
||||||
|
// Also, need to simulate a loop by saving first position and if loop back to first position,
|
||||||
|
// we are done with the search.
|
||||||
|
if (sel.End == 0)
|
||||||
|
{
|
||||||
|
if (firstStart == sel.Start) return null;
|
||||||
|
if (firstStart == 0)
|
||||||
|
firstStart = sel.Start;
|
||||||
|
sel.MoveStart(LBWdUnits.wdCharacter, 1);
|
||||||
|
executeResult = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (executeResult) return sel;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
private static string CreatePDF(string fileName, bool openPdf)
|
private static string CreatePDF(string fileName, bool openPdf)
|
||||||
|
@ -234,14 +234,13 @@ namespace VEPROMS.CSLA.Library
|
|||||||
bool isStepPart = (o is PartInfo && (o as PartInfo).PartType == E_FromType.Step);
|
bool isStepPart = (o is PartInfo && (o as PartInfo).PartType == E_FromType.Step);
|
||||||
if (isStepPart)
|
if (isStepPart)
|
||||||
{
|
{
|
||||||
|
|
||||||
// get parent section and see if it has the Editable flag set. Only skip
|
// get parent section and see if it has the Editable flag set. Only skip
|
||||||
// if this flag is set to "N".
|
// if this flag is set to "N".
|
||||||
ItemInfo sectInfo = (ItemInfo)(o as PartInfo).ActiveParent;
|
ItemInfo sectInfo = (ItemInfo)(o as PartInfo).ActiveParent;
|
||||||
if (sectInfo != null)
|
bool hasMetaSubs = sectInfo != null && sectInfo.Sections != null && sectInfo.Sections.Count > 0;
|
||||||
{
|
bool editSteps = !hasMetaSubs || (sectInfo.MyConfig is SectionConfig && (sectInfo.MyConfig as SectionConfig).SubSection_Edit == "Y");
|
||||||
SectionConfig sc = sectInfo.MyConfig as SectionConfig;
|
if (!editSteps) skipIt = true;
|
||||||
if (sc != null && sc.SubSection_Edit == "N") skipIt = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!skipIt)
|
if (!skipIt)
|
||||||
{
|
{
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user