Supporting logic to handle the use of the backslash character
Supporting logic to handle the use of the backslash character, and question marks Supporting logic to handle the use of the backslash character, dashes, and symbols Supporting logic to handle the use of the backslash character and dashes
This commit is contained in:
parent
66b9792324
commit
4c6d09803d
@ -1017,6 +1017,7 @@ BEGIN
|
|||||||
Set @SearchString = replace(@SearchString,'\%','*')
|
Set @SearchString = replace(@SearchString,'\%','*')
|
||||||
Set @SearchString = replace(@SearchString,'\_','?')
|
Set @SearchString = replace(@SearchString,'\_','?')
|
||||||
Set @SearchString = replace(@SearchString,'-','\u8209?')
|
Set @SearchString = replace(@SearchString,'-','\u8209?')
|
||||||
|
Set @SearchString = replace(@SearchString,'\','\u9586?')
|
||||||
IF(@SearchString like '[%]%') RETURN @SearchString
|
IF(@SearchString like '[%]%') RETURN @SearchString
|
||||||
IF(@SearchString like '%[%]') RETURN @SearchString
|
IF(@SearchString like '%[%]') RETURN @SearchString
|
||||||
Set @SearchString = replace('%' + @SearchString + '%','%%','%')
|
Set @SearchString = replace('%' + @SearchString + '%','%%','%')
|
||||||
@ -2952,11 +2953,18 @@ RETURNS @FoundContents TABLE
|
|||||||
WITH EXECUTE AS OWNER
|
WITH EXECUTE AS OWNER
|
||||||
AS
|
AS
|
||||||
BEGIN
|
BEGIN
|
||||||
|
DECLARE @Dashes varchar(25)
|
||||||
|
set @Dashes = '\u8209?'
|
||||||
|
if(@SearchString not like '%\u8209?%')
|
||||||
|
BEGIN
|
||||||
|
set @Dashes='-'
|
||||||
|
END
|
||||||
IF(ISNULL(@DocVersionList,'')='')
|
IF(ISNULL(@DocVersionList,'')='')
|
||||||
BEGIN
|
BEGIN
|
||||||
INSERT INTO @FoundContents -- Do a case insensitive search
|
INSERT INTO @FoundContents -- Do a case insensitive search
|
||||||
select ContentID,Type,Text from contents
|
select ContentID,Type,Text from contents
|
||||||
where .dbo.vefn_RemoveExtraText(Replace([Text],'-','\u8209?'),@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
where replace(.dbo.vefn_RemoveExtraText(Replace([Text],'-','\u8209?'),@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters),'\u8209?',@Dashes) like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
||||||
|
--where .dbo.vefn_RemoveExtraText(Replace(Replace([Text],'-','\u8209?'),'\','\u9586?'),@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
||||||
-- where Replace([Text],'-','\u8209?') like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
-- where Replace([Text],'-','\u8209?') like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
||||||
--where Replace(Replace([Text],'-','\u8209?'),'\u160?',' ') like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
--where Replace(Replace([Text],'-','\u8209?'),'\u160?',' ') like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
||||||
END
|
END
|
||||||
@ -2966,7 +2974,8 @@ ELSE
|
|||||||
select ContentID,Type,Text from contents
|
select ContentID,Type,Text from contents
|
||||||
where [ContentID] in (select [ContentID] from vefn_DVContent(@DocVersionList))
|
where [ContentID] in (select [ContentID] from vefn_DVContent(@DocVersionList))
|
||||||
-- bug fix B2014-056 and B2014-102 now use vefn_RemoveExtraText which fixes searching for hard spaces and finding procedure text when it is bolded (or italics or underlined etc)
|
-- bug fix B2014-056 and B2014-102 now use vefn_RemoveExtraText which fixes searching for hard spaces and finding procedure text when it is bolded (or italics or underlined etc)
|
||||||
AND .dbo.vefn_RemoveExtraText(Replace([Text],'-','\u8209?'),@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
AND Replace(.dbo.vefn_RemoveExtraText(Replace([Text],'-','\u8209?'),@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters),'\u8209?',@Dashes) like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
||||||
|
--AND .dbo.vefn_RemoveExtraText(Replace(Replace([Text],'-','\u8209?'),'\','\u9586?'),@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
||||||
--AND Replace([Text],'-','\u8209?') like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
--AND Replace([Text],'-','\u8209?') like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
||||||
--AND Replace(Replace([Text],'-','\u8209?'),'\u160?',' ') like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
--AND Replace(Replace([Text],'-','\u8209?'),'\u160?',' ') like @SearchString Collate SQL_Latin1_General_CP1_CI_AS
|
||||||
END
|
END
|
||||||
@ -3023,6 +3032,7 @@ ELSE
|
|||||||
BEGIN
|
BEGIN
|
||||||
Declare @SearchStringx nvarchar(200) --kbr
|
Declare @SearchStringx nvarchar(200) --kbr
|
||||||
set @SearchStringx = replace(@SearchString,'-','\u8209?') --kbr
|
set @SearchStringx = replace(@SearchString,'-','\u8209?') --kbr
|
||||||
|
--set @SearchStringx = replace(replace(@SearchString,'-','\u8209?'),'\','\u9586?') --kbr
|
||||||
IF @CaseSensitive = 0 -- Not Case Sensitive
|
IF @CaseSensitive = 0 -- Not Case Sensitive
|
||||||
BEGIN
|
BEGIN
|
||||||
insert into @FoundContents
|
insert into @FoundContents
|
||||||
@ -5845,6 +5855,7 @@ BEGIN TRY -- Try Block
|
|||||||
)
|
)
|
||||||
DECLARE @NewTopID as int
|
DECLARE @NewTopID as int
|
||||||
INSERT INTO @Procs select ZZ.ItemID, isnull(Replace(CC.Number,'\u8209?','-'),'') + ':' + substring('0000000000000000' + cast(ItemID as varchar(16)), 1+ len( cast(ItemID as varchar(16))), 16) ProcNum from vefn_SiblingItems(@TopID,0) ZZ Join Contents CC on CC.ContentID = ZZ.ContentID
|
INSERT INTO @Procs select ZZ.ItemID, isnull(Replace(CC.Number,'\u8209?','-'),'') + ':' + substring('0000000000000000' + cast(ItemID as varchar(16)), 1+ len( cast(ItemID as varchar(16))), 16) ProcNum from vefn_SiblingItems(@TopID,0) ZZ Join Contents CC on CC.ContentID = ZZ.ContentID
|
||||||
|
--INSERT INTO @Procs select ZZ.ItemID, isnull(Replace(Replace(CC.Number,'\u8209?','-'),'\','\u9586?'),'') + ':' + substring('0000000000000000' + cast(ItemID as varchar(16)), 1+ len( cast(ItemID as varchar(16))), 16) ProcNum from vefn_SiblingItems(@TopID,0) ZZ Join Contents CC on CC.ContentID = ZZ.ContentID
|
||||||
--select * from @Procs order by ProcNum + cast(ItemID as nvarchar(max))
|
--select * from @Procs order by ProcNum + cast(ItemID as nvarchar(max))
|
||||||
select top 1 @NewTopID = ItemID from @Procs order by ProcNum
|
select top 1 @NewTopID = ItemID from @Procs order by ProcNum
|
||||||
INSERT INTO @Organize
|
INSERT INTO @Organize
|
||||||
@ -5896,6 +5907,7 @@ DECLARE @index int
|
|||||||
DECLARE @index2 int
|
DECLARE @index2 int
|
||||||
-- Replace Hard Hyphen with Hyphen
|
-- Replace Hard Hyphen with Hyphen
|
||||||
SET @text = replace(@text,'\u8209?','-')
|
SET @text = replace(@text,'\u8209?','-')
|
||||||
|
--SET @text = replace(replace(@text,'\u8209?','-'),'\u9586?','\')
|
||||||
-- Replace Hard Space with Space
|
-- Replace Hard Space with Space
|
||||||
-- commenting out the bottom two lines will fix the global search for hard space bug (B2014-056)
|
-- commenting out the bottom two lines will fix the global search for hard space bug (B2014-056)
|
||||||
--SET @text = replace(@text,'\u160?',' ')
|
--SET @text = replace(@text,'\u160?',' ')
|
||||||
@ -5965,6 +5977,7 @@ if(@includeSpecialCharacters=0)
|
|||||||
END
|
END
|
||||||
-- Replace Hyphen with Hard Hyphen
|
-- Replace Hyphen with Hard Hyphen
|
||||||
SET @text = replace(@text,'-','\u8209?')
|
SET @text = replace(@text,'-','\u8209?')
|
||||||
|
--SET @text = replace(replace(@text,'-','\u8209?'),'\','\u9586?')
|
||||||
|
|
||||||
RETURN @text
|
RETURN @text
|
||||||
END
|
END
|
||||||
@ -11008,7 +11021,7 @@ with Itemz(ItemCount,ItemID,PreviousID,FromType,CType,Number,Text,PPath, Path) a
|
|||||||
)
|
)
|
||||||
select @Path = path From Itemz where ItemCount=1 and CType=0
|
select @Path = path From Itemz where ItemCount=1 and CType=0
|
||||||
OPTION (MAXRECURSION 10000)
|
OPTION (MAXRECURSION 10000)
|
||||||
return REPLACE(@Path,'\u8209?','-')
|
return REPLACE(REPLACE(@Path,'\u8209?','-'),'u9586?','\\')
|
||||||
END;
|
END;
|
||||||
GO
|
GO
|
||||||
-- Display the status of Proc creation
|
-- Display the status of Proc creation
|
||||||
@ -12335,6 +12348,7 @@ BEGIN
|
|||||||
insert into @EnhancedDocuments
|
insert into @EnhancedDocuments
|
||||||
select VN.VersionID,VN.FolderName, VI.ItemID
|
select VN.VersionID,VN.FolderName, VI.ItemID
|
||||||
, replace(cc.Number,'\u8209?','-') ProcNum, replace(cc.Text,'\u8209?','-') ProcName
|
, replace(cc.Number,'\u8209?','-') ProcNum, replace(cc.Text,'\u8209?','-') ProcName
|
||||||
|
--, replace(replace(cc.Number,'\u8209?','-'),'\u9586?','\') ProcNum, replace(replace(cc.Text,'\u8209?','-'),'\u9586?','\') ProcName
|
||||||
, xEnhanced.value('@Type','int') EnhType, xenhanced.value('@ItemID','int') EnhItemID
|
, xEnhanced.value('@Type','int') EnhType, xenhanced.value('@ItemID','int') EnhItemID
|
||||||
--, xEnhanced.query('.') qEnhanced
|
--, xEnhanced.query('.') qEnhanced
|
||||||
from (select *, cast(config as xml) xconfig from Contents Where config like '%Enhanced%' and Type =0) CC
|
from (select *, cast(config as xml) xconfig from Contents Where config like '%Enhanced%' and Type =0) CC
|
||||||
@ -12696,6 +12710,7 @@ AS
|
|||||||
BEGIN
|
BEGIN
|
||||||
declare @ProcNum varchar(255)
|
declare @ProcNum varchar(255)
|
||||||
select @ProcNum = replace(Number,'\u8209?','-') from contents CC
|
select @ProcNum = replace(Number,'\u8209?','-') from contents CC
|
||||||
|
--select @ProcNum = replace(replace(Number,'\u8209?','-'),'\u9586?','\') from contents CC
|
||||||
join Items II on II.ContentID = CC.ContentID
|
join Items II on II.ContentID = CC.ContentID
|
||||||
Where ItemID = @ItemID
|
Where ItemID = @ItemID
|
||||||
Begin
|
Begin
|
||||||
@ -12767,9 +12782,11 @@ Insert into @EnhItems-- Procedures
|
|||||||
select @SourceID SrcItemID, (select ContentID from Items Where ItemID = @SourceID) SrcContentID
|
select @SourceID SrcItemID, (select ContentID from Items Where ItemID = @SourceID) SrcContentID
|
||||||
,'<Enhanced Type="' + cast(@EnhType as varchar(12)) + '" ItemID = "' + cast(@EnhanceID as varchar(12)) + '"/>' SrcConfig
|
,'<Enhanced Type="' + cast(@EnhType as varchar(12)) + '" ItemID = "' + cast(@EnhanceID as varchar(12)) + '"/>' SrcConfig
|
||||||
,isnull(VSO.ProcName,replace(CCS.Number,'\u8209?','-')) SrcProcName, null SrcRecID
|
,isnull(VSO.ProcName,replace(CCS.Number,'\u8209?','-')) SrcProcName, null SrcRecID
|
||||||
|
--,isnull(VSO.ProcName,replace(replace(CCS.Number,'\u8209?','-'),'\u9586?','\')) SrcProcName, null SrcRecID
|
||||||
,@EnhanceID EnhItemID, (select ContentID from Items Where ItemID = @EnhanceID) EnhContentID
|
,@EnhanceID EnhItemID, (select ContentID from Items Where ItemID = @EnhanceID) EnhContentID
|
||||||
,'<Enhanced Type="0" ItemID = "' + cast(@SourceID as varchar(12)) + '"/>' EnhConfig
|
,'<Enhanced Type="0" ItemID = "' + cast(@SourceID as varchar(12)) + '"/>' EnhConfig
|
||||||
,isnull(VEO.ProcName ,replace(CCE.Number,'\u8209?','-')) EnhProcNam, null EnhRecID
|
,isnull(VEO.ProcName ,replace(CCE.Number,'\u8209?','-')) EnhProcNam, null EnhRecID
|
||||||
|
--,isnull(VEO.ProcName ,replace(replace(CCE.Number,'\u8209?','-'),'\u9586?','\')) EnhProcNam, null EnhRecID
|
||||||
From vefn_GetOldEnhancedData(@SourceID) VSO
|
From vefn_GetOldEnhancedData(@SourceID) VSO
|
||||||
cross apply vefn_GetOldEnhancedData(@EnhanceID) VEO
|
cross apply vefn_GetOldEnhancedData(@EnhanceID) VEO
|
||||||
JOIN Contents CCS ON VSO.ContentID = CCs.ContentID
|
JOIN Contents CCS ON VSO.ContentID = CCs.ContentID
|
||||||
|
@ -119,7 +119,7 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
else if (MyProcedure != null)
|
else if (MyProcedure != null)
|
||||||
{
|
{
|
||||||
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_"));
|
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_").Replace("\\","_"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void txtExport_TextChanged(object sender, EventArgs e)
|
private void txtExport_TextChanged(object sender, EventArgs e)
|
||||||
@ -279,7 +279,7 @@ namespace VEPROMS
|
|||||||
// procedure numbers that contain a hyphen may have the hyphen represented as the unicode character
|
// procedure numbers that contain a hyphen may have the hyphen represented as the unicode character
|
||||||
// '\u8209?' or the '-' character. If proc number is same except for hyphen representation, they
|
// '\u8209?' or the '-' character. If proc number is same except for hyphen representation, they
|
||||||
// should be considered the same procedure (fix for B2016-084)
|
// should be considered the same procedure (fix for B2016-084)
|
||||||
string hyphenNum = pi.MyContent.Number == null ? "" : pi.MyContent.Number.Replace(@"\u8209?", "-").Replace("\u2011", "-");
|
string hyphenNum = pi.MyContent.Number == null ? "" : pi.MyContent.Number.Replace(@"\u8209?", "-").Replace("\u2011", "-").Replace("\u9586?","_").Replace("\u2572", @"\");
|
||||||
string hyphenImpNum = xd.SelectSingleNode("procedure/content/@number").InnerText;
|
string hyphenImpNum = xd.SelectSingleNode("procedure/content/@number").InnerText;
|
||||||
// bug fix C2015-044 - jsj
|
// bug fix C2015-044 - jsj
|
||||||
// - the cancel button would ignor the user's wishes and proceed with the import (overwriting the existing procedure)
|
// - the cancel button would ignor the user's wishes and proceed with the import (overwriting the existing procedure)
|
||||||
@ -287,7 +287,7 @@ namespace VEPROMS
|
|||||||
// - our standard unicode dash (\u8209?) before conparing the existing and imported
|
// - our standard unicode dash (\u8209?) before conparing the existing and imported
|
||||||
// - also found the Overrite and make a copy of messages looked too similar - fixed that as well.
|
// - also found the Overrite and make a copy of messages looked too similar - fixed that as well.
|
||||||
//hyphenImpNum = hyphenImpNum == null ? "" : hyphenImpNum.Replace("\u8030?", "-"); -did not find any reason to have this \u8030? - note retested sourcesafe doc for B2016-084 without this logic and it was fine
|
//hyphenImpNum = hyphenImpNum == null ? "" : hyphenImpNum.Replace("\u8030?", "-"); -did not find any reason to have this \u8030? - note retested sourcesafe doc for B2016-084 without this logic and it was fine
|
||||||
hyphenImpNum = hyphenImpNum == null ? "" : hyphenImpNum.Replace(@"\u8209?", "-").Replace("\u2011", "-");
|
hyphenImpNum = hyphenImpNum == null ? "" : hyphenImpNum.Replace(@"\u8209?", "-").Replace("\u2011", "-").Replace(@"\u9586?", @"\").Replace("\u2572", @"\");
|
||||||
|
|
||||||
if (hyphenNum == hyphenImpNum)
|
if (hyphenNum == hyphenImpNum)
|
||||||
{
|
{
|
||||||
|
@ -2183,7 +2183,7 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
MostRecentItem mri = _MyMRIList[i];
|
MostRecentItem mri = _MyMRIList[i];
|
||||||
ButtonItem btnItem = new ButtonItem();
|
ButtonItem btnItem = new ButtonItem();
|
||||||
string menuTitle = mri.MenuTitle.Replace("\u2011", "-");
|
string menuTitle = mri.MenuTitle.Replace("\u2011", "-").Replace("\u2572", @"\");
|
||||||
if (i < 9)
|
if (i < 9)
|
||||||
btnItem.Text = string.Format("<b>&{0}.</b> {1}", i + 1, menuTitle);
|
btnItem.Text = string.Format("<b>&{0}.</b> {1}", i + 1, menuTitle);
|
||||||
else
|
else
|
||||||
|
@ -273,6 +273,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
//if the dash is preceeded byte a token remove the space following the token
|
//if the dash is preceeded 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?");
|
||||||
|
// convert backslashes to a backslash symbol
|
||||||
|
s2 = s2.Replace(@"\", @"\u9586?");
|
||||||
return s2;
|
return s2;
|
||||||
}
|
}
|
||||||
private string FixUnitROs(string val)
|
private string FixUnitROs(string val)
|
||||||
|
@ -48,7 +48,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
string itemTitle = Regex.Replace(this.MyItemInfo.SearchPath, "^..+?\\u0007", "");
|
string itemTitle = Regex.Replace(this.MyItemInfo.SearchPath, "^..+?\\u0007", "");
|
||||||
itemTitle = itemTitle.Replace("\x11", itemTitle[0] == '\x11' ? "" : " - ").Replace("\\u8209?", "-");
|
itemTitle = itemTitle.Replace("\x11", itemTitle[0] == '\x11' ? "" : " - ").Replace("\\u8209?", "-").Replace(@"\u9586?", @"\");
|
||||||
return string.Format("{0} Annotation {1}", itemTitle, this.ListString());
|
return string.Format("{0} Annotation {1}", itemTitle, this.ListString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
string itemTitle = Regex.Replace(this.Path, "^..+?\\u0007", "");
|
string itemTitle = Regex.Replace(this.Path, "^..+?\\u0007", "");
|
||||||
itemTitle = itemTitle.Replace("\x11", itemTitle[0] == '\x11' ? "" : " - ").Replace("\\u8209?", "-");
|
itemTitle = itemTitle.Replace("\x11", itemTitle[0] == '\x11' ? "" : " - ").Replace("\\u8209?", "-").Replace(@"\u9586?",@"\");
|
||||||
return string.Format("{4} item {0} by {1} on {2} @ {3}", this.ActionWhat, this.UserID, this.ActionWhen == DateTime.MinValue ? this.DTS.ToShortDateString() : this.ActionWhen.ToShortDateString(), this.ActionWhen == DateTime.MinValue ? this.DTS.ToShortTimeString() : this.ActionWhen.ToShortTimeString(), itemTitle);
|
return string.Format("{4} item {0} by {1} on {2} @ {3}", this.ActionWhat, this.UserID, this.ActionWhen == DateTime.MinValue ? this.DTS.ToShortDateString() : this.ActionWhen.ToShortDateString(), this.ActionWhen == DateTime.MinValue ? this.DTS.ToShortTimeString() : this.ActionWhen.ToShortTimeString(), itemTitle);
|
||||||
//return string.Format("{0} by {1} on {2}", this.DeleteStatus == 0 ? "Changed" : "Deleted", this.UserID, this.DTS.ToString("MM/dd/yyyy @ HH:mm:ss"));
|
//return string.Format("{0} by {1} on {2}", this.DeleteStatus == 0 ? "Changed" : "Deleted", this.UserID, this.DTS.ToString("MM/dd/yyyy @ HH:mm:ss"));
|
||||||
//return string.Format("{0} - {1} {2}", this.UserID, this.DTS, this.DeleteStatus == 0 ? "" : "Deleted");
|
//return string.Format("{0} - {1} {2}", this.UserID, this.DTS, this.DeleteStatus == 0 ? "" : "Deleted");
|
||||||
|
@ -78,10 +78,11 @@ namespace VEPROMS.CSLA.Library
|
|||||||
Transition.Delete(tran.TransitionID);
|
Transition.Delete(tran.TransitionID);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if ((gg.Contains("\\u8209?") ? gg.Replace("\\u8209?", "-") : gg) != (newvalue.Contains("\\u8209?") ? newvalue.Replace("\\u8209?", "-") : newvalue))
|
//else if ((gg.Contains("\\u8209?") ? gg.Replace("\\u8209?", "-") : gg) != (newvalue.Contains("\\u8209?") ? newvalue.Replace("\\u8209?", "-") : newvalue))
|
||||||
|
else if ((gg.Replace(@"\u8209?", "-").Replace(@"\u9568?", @"\\")) != (newvalue.Replace(@"\u8209?", "-").Replace(@"\u9568?", @"\\")))
|
||||||
{
|
{
|
||||||
Text = Text.Substring(0, myIndex) + newvalue + Text.Substring(myIndex + myLength);
|
Text = Text.Substring(0, myIndex) + newvalue + Text.Substring(myIndex + myLength);
|
||||||
break; // Text has been processed
|
break; // Text has been processed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,7 +114,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
myLength += mg.Groups[3].Length;
|
myLength += mg.Groups[3].Length;
|
||||||
}
|
}
|
||||||
string gg = MyGrid.Data.Substring(myIndex, myLength);
|
string gg = MyGrid.Data.Substring(myIndex, myLength);
|
||||||
if (newvalue.Contains(@"\u8209?"))
|
if (newvalue.Contains(@"\u8209?")) // process dash
|
||||||
{
|
{
|
||||||
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
||||||
if (m == null)
|
if (m == null)
|
||||||
@ -121,7 +122,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
else
|
else
|
||||||
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
|
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
|
||||||
}
|
}
|
||||||
if (newvalue.Contains(@"\u8593?"))
|
if (newvalue.Contains(@"\u8593?")) // process carrot/delta
|
||||||
{
|
{
|
||||||
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
||||||
if (m == null)
|
if (m == null)
|
||||||
@ -129,6 +130,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
else
|
else
|
||||||
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);
|
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);
|
||||||
}
|
}
|
||||||
|
if (newvalue.Contains(@"\u9586?")) // process backslash
|
||||||
|
{
|
||||||
|
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
||||||
|
if (m == null)
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", @"\\");
|
||||||
|
else
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
|
||||||
|
}
|
||||||
if (gg != newvalue)
|
if (gg != newvalue)
|
||||||
{
|
{
|
||||||
MyGrid.Data = MyGrid.Data.Substring(0, myIndex) + newvalue + MyGrid.Data.Substring(myIndex + myLength);
|
MyGrid.Data = MyGrid.Data.Substring(0, myIndex) + newvalue + MyGrid.Data.Substring(myIndex + myLength);
|
||||||
@ -199,6 +208,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
else
|
else
|
||||||
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
|
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
|
||||||
}
|
}
|
||||||
|
if (gg.Contains(@"\u9586?")) // process backslash symbol
|
||||||
|
{
|
||||||
|
Match mmm = Regex.Match(gg, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
||||||
|
if (mmm == null)
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", @"\\");
|
||||||
|
else
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
|
||||||
|
}
|
||||||
Text = part1 + part2 + part3;
|
Text = part1 + part2 + part3;
|
||||||
break; // Text has been processed
|
break; // Text has been processed
|
||||||
}
|
}
|
||||||
@ -255,6 +272,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
else
|
else
|
||||||
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
|
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
|
||||||
}
|
}
|
||||||
|
if (gg.Contains(@"\u9586?"))
|
||||||
|
{
|
||||||
|
Match mmm = Regex.Match(gg, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
||||||
|
if (mmm == null)
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", @"\\");
|
||||||
|
else
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
|
||||||
|
}
|
||||||
Text = part1 + part2 + part3;
|
Text = part1 + part2 + part3;
|
||||||
break; // Text has been processed
|
break; // Text has been processed
|
||||||
}
|
}
|
||||||
@ -339,6 +364,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
else
|
else
|
||||||
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
|
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
|
||||||
}
|
}
|
||||||
|
if (gg.Contains(@"\u9586?"))
|
||||||
|
{
|
||||||
|
Match mmm = Regex.Match(gg, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
||||||
|
if (mmm == null)
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", @"\\");
|
||||||
|
else
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
|
||||||
|
}
|
||||||
//System.Text.RegularExpressions.Group g2 = m.Groups[2];
|
//System.Text.RegularExpressions.Group g2 = m.Groups[2];
|
||||||
//if (g2.Value.StartsWith(@"\u8209?"))
|
//if (g2.Value.StartsWith(@"\u8209?"))
|
||||||
//{
|
//{
|
||||||
@ -406,6 +439,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
else
|
else
|
||||||
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
|
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
|
||||||
}
|
}
|
||||||
|
if (newvalue.Contains(@"\u9586?"))
|
||||||
|
{
|
||||||
|
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
||||||
|
if (m == null)
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", @"\\");
|
||||||
|
else
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
|
||||||
|
}
|
||||||
if (gg != newvalue)
|
if (gg != newvalue)
|
||||||
{
|
{
|
||||||
MyGrid.Data = MyGrid.Data.Substring(0, myIndex) + newvalue + MyGrid.Data.Substring(myIndex + myLength);
|
MyGrid.Data = MyGrid.Data.Substring(0, myIndex) + newvalue + MyGrid.Data.Substring(myIndex + myLength);
|
||||||
@ -516,6 +557,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
else
|
else
|
||||||
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);
|
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);
|
||||||
}
|
}
|
||||||
|
if (newvalue.Contains(@"\u9586?"))
|
||||||
|
{
|
||||||
|
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
||||||
|
if (m == null)
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", @"\\");
|
||||||
|
else
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
|
||||||
|
}
|
||||||
if (gg != newvalue)
|
if (gg != newvalue)
|
||||||
{
|
{
|
||||||
retval = gg;
|
retval = gg;
|
||||||
@ -638,7 +687,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
string gg = Text.Substring(myIndex, myLength);
|
string gg = Text.Substring(myIndex, myLength);
|
||||||
MyContentMessage = string.Format("ContentExt.ContentInfo:Content:{0}, {1}, {2}", this.ContentID, tran.TransitionID, gg);
|
MyContentMessage = string.Format("ContentExt.ContentInfo:Content:{0}, {1}, {2}", this.ContentID, tran.TransitionID, gg);
|
||||||
newvalue = newvalue.Replace("{", @"\{").Replace("}", @"\}");
|
newvalue = newvalue.Replace("{", @"\{").Replace("}", @"\}");
|
||||||
if ((gg.Contains("\\u8209?") ? gg.Replace("\\u8209?", "-") : gg) != (newvalue.Contains("\\u8209?") ? newvalue.Replace("\\u8209?", "-") : newvalue))
|
//if ((gg.Contains("\\u8209?") ? gg.Replace("\\u8209?", "-") : gg) != (newvalue.Contains("\\u8209?") ? newvalue.Replace("\\u8209?", "-") : newvalue))
|
||||||
|
if ((gg.Replace(@"\u8209?", "-").Replace(@"\u9586?",@"\\")) != (newvalue.Replace("\\u8209?", "-").Replace(@"\u9586?",@"\\")))
|
||||||
{
|
{
|
||||||
_Text = Text.Substring(0, myIndex) + newvalue + Text.Substring(myIndex + myLength);
|
_Text = Text.Substring(0, myIndex) + newvalue + Text.Substring(myIndex + myLength);
|
||||||
if (newvalue == "?")
|
if (newvalue == "?")
|
||||||
@ -707,6 +757,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
else
|
else
|
||||||
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);
|
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);
|
||||||
}
|
}
|
||||||
|
if (newvalue.Contains(@"\u9586?"))
|
||||||
|
{
|
||||||
|
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
||||||
|
if (m == null)
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", @"\\");
|
||||||
|
else
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
|
||||||
|
}
|
||||||
MyGridMessage = string.Format("ContentExt.ContentInfo:Grid:{0}, {1}, {2}", this.ContentID, tran.TransitionID, gg);
|
MyGridMessage = string.Format("ContentExt.ContentInfo:Grid:{0}, {1}, {2}", this.ContentID, tran.TransitionID, gg);
|
||||||
if (gg != newvalue)
|
if (gg != newvalue)
|
||||||
{
|
{
|
||||||
@ -838,6 +896,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
else
|
else
|
||||||
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);
|
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);
|
||||||
}
|
}
|
||||||
|
if (newvalue.Contains(@"\u9586?"))
|
||||||
|
{
|
||||||
|
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
|
||||||
|
if (m.Groups.Count < 3)
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", @"\\");
|
||||||
|
else
|
||||||
|
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
|
||||||
|
}
|
||||||
if (gg != newvalue)
|
if (gg != newvalue)
|
||||||
{
|
{
|
||||||
string prefix1 = MyGrid.Data.Substring(0,mmg.Index);
|
string prefix1 = MyGrid.Data.Substring(0,mmg.Index);
|
||||||
|
@ -186,6 +186,13 @@ namespace VEPROMS.CSLA.Library
|
|||||||
text =Regex.Replace(text, @"(?<=\\[^\\?' \r\n\t]+)\\u8209\?", " -");
|
text =Regex.Replace(text, @"(?<=\\[^\\?' \r\n\t]+)\\u8209\?", " -");
|
||||||
text = text.Replace(@"\u8209?", "-");
|
text = text.Replace(@"\u8209?", "-");
|
||||||
}
|
}
|
||||||
|
// Replace backslash symbol with normal backslash so the PDF search for backslashes will work properly
|
||||||
|
if (text.Contains(@"\u9586?") && epMode == E_EditPrintMode.Print)
|
||||||
|
{
|
||||||
|
// Handle RTF Tokens followed immediately by a backslash
|
||||||
|
text =Regex.Replace(text, @"(?<=\\[^\\?' \r\n\t]+)\\u9586\?", @" \\");
|
||||||
|
text = text.Replace(@"\u9586?", @"\\");
|
||||||
|
}
|
||||||
_MyStaticItemInfo = _MyItemInfo;
|
_MyStaticItemInfo = _MyItemInfo;
|
||||||
text = CreateRtf(colorLinks, text, tableShouldBeOutlined, wordsShouldBeReplaced, numbersShouldBeFormated, tableHasBorder, ROsShouldBeAdjusted, underlineAfterDashSpace, epMode);
|
text = CreateRtf(colorLinks, text, tableShouldBeOutlined, wordsShouldBeReplaced, numbersShouldBeFormated, tableHasBorder, ROsShouldBeAdjusted, underlineAfterDashSpace, epMode);
|
||||||
_MyStaticItemInfo = null;
|
_MyStaticItemInfo = null;
|
||||||
|
@ -2484,6 +2484,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
retval = StripLinks(retval);
|
retval = StripLinks(retval);
|
||||||
retval = ReplaceSpecialCharacters(retval);
|
retval = ReplaceSpecialCharacters(retval);
|
||||||
retval = retval.Replace("\u2011", "-");
|
retval = retval.Replace("\u2011", "-");
|
||||||
|
retval = retval.Replace("\u2572", @"\"); // replace backslash symbol with a backslash
|
||||||
retval = Regex.Replace(retval, @"\\line ?", ";"); // better handing of hard returns - replace with semi-colon for use on tree view
|
retval = Regex.Replace(retval, @"\\line ?", ";"); // better handing of hard returns - replace with semi-colon for use on tree view
|
||||||
retval = retval.Replace("\r\n", ";");
|
retval = retval.Replace("\r\n", ";");
|
||||||
retval = retval.Replace("\n", ";"); //added for consistency checking with approved version
|
retval = retval.Replace("\n", ";"); //added for consistency checking with approved version
|
||||||
@ -2931,19 +2932,19 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (MyContent.MyEntry == null)
|
if (MyContent.MyEntry == null)
|
||||||
{
|
{
|
||||||
if (DisplayNumber == string.Empty)
|
if (DisplayNumber == string.Empty)
|
||||||
return DisplayText.Replace("\u2011", "-").Split(" ,.;:-_".ToCharArray())[0] + "...";
|
return DisplayText.Replace("\u2011", "-").Replace("\u2572", @"\\").Split(" ,.;:-_".ToCharArray())[0] + "...";
|
||||||
return DisplayNumber.Replace("\u2011", "-");
|
return DisplayNumber.Replace("\u2011", "-").Replace("\u2572", @"\\");
|
||||||
}
|
}
|
||||||
if (MyContent.Number != "") // Add LIB to the Section Number
|
if (MyContent.Number != "") // Add LIB to the Section Number
|
||||||
return ((MyContent.MyEntry.MyDocument.LibTitle ?? "") == "" ? "" : "\u1D38\u1D35\u1D2E ") + DisplayNumber;
|
return ((MyContent.MyEntry.MyDocument.LibTitle ?? "") == "" ? "" : "\u1D38\u1D35\u1D2E ") + DisplayNumber;
|
||||||
if (MyContent.MyEntry.MyDocument.LibTitle != "")
|
if (MyContent.MyEntry.MyDocument.LibTitle != "")
|
||||||
{
|
{
|
||||||
if (DisplayText.Length <= 7) return "\u1D38\u1D35\u1D2E " + DisplayText.Replace("\u2011", "-");
|
if (DisplayText.Length <= 7) return "\u1D38\u1D35\u1D2E " + DisplayText.Replace("\u2011", "-").Replace("\u2572", @"\\");
|
||||||
return "\u1D38\u1D35\u1D2E " + DisplayText.Replace("\u2011", "-").Split(" ,.;:-_".ToCharArray())[0] + "...";
|
return "\u1D38\u1D35\u1D2E " + DisplayText.Replace("\u2011", "-").Split(" ,.;:-_".ToCharArray())[0] + "...";
|
||||||
}
|
}
|
||||||
if (DisplayText.Length <= 10)
|
if (DisplayText.Length <= 10)
|
||||||
return DisplayText.Replace("\u2011", "-");
|
return DisplayText.Replace("\u2011", "-").Replace("\u2572", @"\\");
|
||||||
return DisplayText.Replace("\u2011", "-").Split(" ,.;:-_".ToCharArray())[0] + "...";
|
return DisplayText.Replace("\u2011", "-").Replace("\u2572", @"\\").Split(" ,.;:-_".ToCharArray())[0] + "...";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -559,7 +559,7 @@ namespace Volian.Controls.Library
|
|||||||
private static string FixPath(string path)
|
private static string FixPath(string path)
|
||||||
{
|
{
|
||||||
string itemTitle = Regex.Replace(path, "^..+?\\u0007", "");
|
string itemTitle = Regex.Replace(path, "^..+?\\u0007", "");
|
||||||
itemTitle = itemTitle.Replace("\x11", itemTitle[0] == '\x11' ? "" : " - ").Replace("\\u8209?", "-");
|
itemTitle = itemTitle.Replace("\x11", itemTitle[0] == '\x11' ? "" : " - ").Replace(@"\u8209?", "-").Replace(@"\u9586?",@"\");
|
||||||
return itemTitle;
|
return itemTitle;
|
||||||
}
|
}
|
||||||
private void btnViewChronologyReport_Click(object sender, EventArgs e)
|
private void btnViewChronologyReport_Click(object sender, EventArgs e)
|
||||||
|
@ -119,7 +119,7 @@ namespace Volian.Controls.Library
|
|||||||
//Spin through ROs looking for the selected text
|
//Spin through ROs looking for the selected text
|
||||||
if (MyRTB.SelectedText != "")
|
if (MyRTB.SelectedText != "")
|
||||||
{
|
{
|
||||||
string lookFor = MyRTB.SelectedText.Replace('\u2011', '-');
|
string lookFor = MyRTB.SelectedText.Replace('\u2011', '-').Replace(@"\u9586?", @"\\");
|
||||||
List<ROFSTLookup.roChild> children = null;
|
List<ROFSTLookup.roChild> children = null;
|
||||||
if (_MyROFST != null) children = _MyROFST.GetROFSTLookup(Mydvi).GetRosByValue(lookFor);
|
if (_MyROFST != null) children = _MyROFST.GetROFSTLookup(Mydvi).GetRosByValue(lookFor);
|
||||||
if (children != null)
|
if (children != null)
|
||||||
|
@ -1236,7 +1236,7 @@ namespace Volian.Controls.Library
|
|||||||
Cursor = Cursors.WaitCursor;
|
Cursor = Cursors.WaitCursor;
|
||||||
SearchResults = null;
|
SearchResults = null;
|
||||||
bool includeRTFformat = false;
|
bool includeRTFformat = false;
|
||||||
bool includeSpecialChars = true;
|
bool includeSpecialChars = (TextSearchString != @"\?"); // true;
|
||||||
// Build list of selected types that were searched
|
// Build list of selected types that were searched
|
||||||
string typstr = null;
|
string typstr = null;
|
||||||
foreach (string s in lstCheckedStepTypesStr) typstr = typstr == null ? s : typstr + ", " + s;
|
foreach (string s in lstCheckedStepTypesStr) typstr = typstr == null ? s : typstr + ", " + s;
|
||||||
@ -1287,7 +1287,7 @@ namespace Volian.Controls.Library
|
|||||||
SearchString = TextSearchString;
|
SearchString = TextSearchString;
|
||||||
//TypesSelected = (typstr != null) ? "Searched Step Types: " + typstr : "Searched All Step Types";
|
//TypesSelected = (typstr != null) ? "Searched Step Types: " + typstr : "Searched All Step Types";
|
||||||
//TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "All Step Types");
|
//TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "All Step Types");
|
||||||
SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, TextSearchString, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxIncROTextSrch.Checked ? ItemSearchIncludeLinks.Value : ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars, unitPrefix);
|
SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, TextSearchString /*.Replace(@"\",@"\u9586?")*/, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxIncROTextSrch.Checked ? ItemSearchIncludeLinks.Value : ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars, unitPrefix);
|
||||||
cmbResultsStyleIndex = 3; // display step text in results
|
cmbResultsStyleIndex = 3; // display step text in results
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
@ -241,7 +241,7 @@ namespace Volian.Controls.Library
|
|||||||
Name = "tabItem Item " + _MyItemInfo.ItemID;
|
Name = "tabItem Item " + _MyItemInfo.ItemID;
|
||||||
Text = _MyItemInfo.TabTitle;
|
Text = _MyItemInfo.TabTitle;
|
||||||
_MyItemInfo.Changed += new ItemInfoEvent(_MyItemInfo_Changed);
|
_MyItemInfo.Changed += new ItemInfoEvent(_MyItemInfo_Changed);
|
||||||
Tooltip = _Tooltip = _MyItemInfo.TabToolTip.Replace("\u2011", "-");
|
Tooltip = _Tooltip = _MyItemInfo.TabToolTip.Replace("\u2011", "-").Replace(@"\u9586?", @"\");
|
||||||
MouseMove += new System.Windows.Forms.MouseEventHandler(DisplayTabItem_MouseMove);
|
MouseMove += new System.Windows.Forms.MouseEventHandler(DisplayTabItem_MouseMove);
|
||||||
LostFocus += new EventHandler(DisplayTabItem_LostFocus);
|
LostFocus += new EventHandler(DisplayTabItem_LostFocus);
|
||||||
//
|
//
|
||||||
@ -276,7 +276,7 @@ namespace Volian.Controls.Library
|
|||||||
void _MyItemInfo_Changed(object sender)
|
void _MyItemInfo_Changed(object sender)
|
||||||
{
|
{
|
||||||
Text = _MyItemInfo.TabTitle;
|
Text = _MyItemInfo.TabTitle;
|
||||||
Tooltip = _Tooltip = _MyItemInfo.TabToolTip.Replace("\u2011", "-");
|
Tooltip = _Tooltip = _MyItemInfo.TabToolTip.Replace("\u2011", "-").Replace(@"\u9586?", @"\");
|
||||||
}
|
}
|
||||||
void DisplayTabItem_LostFocus(object sender, EventArgs e)
|
void DisplayTabItem_LostFocus(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -308,7 +308,7 @@ namespace Volian.Controls.Library
|
|||||||
Control = _MyDSOTabPanel;
|
Control = _MyDSOTabPanel;
|
||||||
Name = "tabItem Item " + _MyItemInfo.ItemID;
|
Name = "tabItem Item " + _MyItemInfo.ItemID;
|
||||||
Text = _MyItemInfo.TabTitle;
|
Text = _MyItemInfo.TabTitle;
|
||||||
Tooltip = _Tooltip = _MyItemInfo.TabToolTip.Replace("\u2011", "-");
|
Tooltip = _Tooltip = _MyItemInfo.TabToolTip.Replace("\u2011", "-").Replace(@"\u9586?", @"\");
|
||||||
MouseMove += new System.Windows.Forms.MouseEventHandler(DisplayTabItem_MouseMove);
|
MouseMove += new System.Windows.Forms.MouseEventHandler(DisplayTabItem_MouseMove);
|
||||||
LostFocus += new EventHandler(DisplayTabItem_LostFocus);
|
LostFocus += new EventHandler(DisplayTabItem_LostFocus);
|
||||||
_MyDisplayTabControl.Controls.Add(_MyDSOTabPanel);
|
_MyDisplayTabControl.Controls.Add(_MyDSOTabPanel);
|
||||||
|
@ -174,16 +174,32 @@ namespace Volian.Controls.Library
|
|||||||
doingfind = false;
|
doingfind = false;
|
||||||
this.Visible = false;
|
this.Visible = false;
|
||||||
}
|
}
|
||||||
|
private string FixSymbol(string str)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
foreach (char c in str)
|
||||||
|
{
|
||||||
|
if (c > 0xff)
|
||||||
|
sb.Append(string.Format(@"\u{0}?", (int)c));
|
||||||
|
else
|
||||||
|
sb.Append(c);
|
||||||
|
}
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
private void btnFindNext_Click(object sender, EventArgs e)
|
private void btnFindNext_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
AddToComboLists();
|
AddToComboLists();
|
||||||
doingfind = true;
|
doingfind = true;
|
||||||
|
string fndStr = FixSymbol(cmboFindText.Text.Replace(@"\", @"\u9586?").Replace("-", @"\u8209?").Replace("\xa0", @"\u160?"));
|
||||||
while (!MyEditItem.FindText(cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked))
|
while (!MyEditItem.FindText(cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked))
|
||||||
{
|
{
|
||||||
ItemInfo next = (cbxReverse.Checked) ? MyEditItem.MyItemInfo.SearchPrev : MyEditItem.MyItemInfo.SearchNext;
|
ItemInfo next = (cbxReverse.Checked) ? MyEditItem.MyItemInfo.SearchPrev : MyEditItem.MyItemInfo.SearchNext;
|
||||||
|
|
||||||
while ((next != null) && !next.IsSection && !next.MyContent.Text.ToUpper().Contains(cmboFindText.Text.ToUpper()))
|
while ((next != null) && !next.IsSection && !next.MyContent.Text.Contains(fndStr))
|
||||||
|
{
|
||||||
next = (cbxReverse.Checked) ? next.SearchPrev : next.SearchNext;
|
next = (cbxReverse.Checked) ? next.SearchPrev : next.SearchNext;
|
||||||
|
}
|
||||||
|
if (next != null) Console.WriteLine("next {0} {1}", next.ItemID, next.MyContent.Text);
|
||||||
if ((next == null) || next.IsSection)
|
if ((next == null) || next.IsSection)
|
||||||
{
|
{
|
||||||
if (!findingbookmarks)
|
if (!findingbookmarks)
|
||||||
|
@ -1235,6 +1235,7 @@ namespace Volian.Controls.Library
|
|||||||
int position = SelectionStart;
|
int position = SelectionStart;
|
||||||
SelectionLength = 0;
|
SelectionLength = 0;
|
||||||
linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 ");
|
linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 ");
|
||||||
|
linkValue = linkValue.Replace("\\u9586?", "\\f1\\u9586?\\f0 "); // backslash symbol
|
||||||
linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 ");
|
linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 ");
|
||||||
linkValue = linkValue.Replace(@"{", @"\{");
|
linkValue = linkValue.Replace(@"{", @"\{");
|
||||||
linkValue = linkValue.Replace(@"}", @"\}");
|
linkValue = linkValue.Replace(@"}", @"\}");
|
||||||
@ -1939,6 +1940,7 @@ namespace Volian.Controls.Library
|
|||||||
using (StepRTB srtb = new StepRTB())
|
using (StepRTB srtb = new StepRTB())
|
||||||
{
|
{
|
||||||
srtb.Rtf = this.SelectedRtf.Replace(@"\u8209?", "-");
|
srtb.Rtf = this.SelectedRtf.Replace(@"\u8209?", "-");
|
||||||
|
srtb.Rtf = srtb.Rtf.Replace(@"\u9586?", @"\\");
|
||||||
string rtnstr = "";
|
string rtnstr = "";
|
||||||
string ctxt = srtb.Text;//this.SelectedText;
|
string ctxt = srtb.Text;//this.SelectedText;
|
||||||
if (ctxt.EndsWith("<START]"))
|
if (ctxt.EndsWith("<START]"))
|
||||||
@ -2416,6 +2418,8 @@ namespace Volian.Controls.Library
|
|||||||
string strpressed = null;
|
string strpressed = null;
|
||||||
if (e.KeyChar == '-')
|
if (e.KeyChar == '-')
|
||||||
strpressed = GetAddSymbolText(@"\u8209?");
|
strpressed = GetAddSymbolText(@"\u8209?");
|
||||||
|
else if (e.KeyChar == '\\')
|
||||||
|
strpressed = GetAddSymbolText(@"\u9586?");
|
||||||
else
|
else
|
||||||
strpressed = e.KeyChar.ToString();
|
strpressed = e.KeyChar.ToString();
|
||||||
if (e.KeyChar >= ' ')
|
if (e.KeyChar >= ' ')
|
||||||
@ -2445,7 +2449,8 @@ namespace Volian.Controls.Library
|
|||||||
else if (e.KeyChar == '}')
|
else if (e.KeyChar == '}')
|
||||||
AddRtf(@"\}");
|
AddRtf(@"\}");
|
||||||
else if (e.KeyChar == '\\')
|
else if (e.KeyChar == '\\')
|
||||||
AddRtf(@"\\");
|
AddSymbol(@"\u9586?"); // unicode hex 2572
|
||||||
|
//AddRtf(@"\\");
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
e.Handled = true; // flag that it's been handled, otherwise, will get 2 chars.
|
e.Handled = true; // flag that it's been handled, otherwise, will get 2 chars.
|
||||||
@ -2504,6 +2509,7 @@ namespace Volian.Controls.Library
|
|||||||
ptext = ptext.Replace("\u2013", "-"); // Replace EN Dash with hyphen
|
ptext = ptext.Replace("\u2013", "-"); // Replace EN Dash with hyphen
|
||||||
ptext = ptext.Replace("\u2014", "-"); // Replace EM Dash with hyphen
|
ptext = ptext.Replace("\u2014", "-"); // Replace EM Dash with hyphen
|
||||||
ptext = ptext.Replace("\u2011", "-"); // Replace non-breaking hyphen with hyphen
|
ptext = ptext.Replace("\u2011", "-"); // Replace non-breaking hyphen with hyphen
|
||||||
|
ptext = ptext.Replace("\u2572", "\\"); // Replace backslash symbol with backslash character
|
||||||
if (didCharReplace)
|
if (didCharReplace)
|
||||||
MessageBox.Show("Replacing pasted characters that are not supported by Proms with a '?'.");
|
MessageBox.Show("Replacing pasted characters that are not supported by Proms with a '?'.");
|
||||||
return ptext;
|
return ptext;
|
||||||
@ -2750,6 +2756,7 @@ namespace Volian.Controls.Library
|
|||||||
bool keepgoing = true;
|
bool keepgoing = true;
|
||||||
while (keepgoing)
|
while (keepgoing)
|
||||||
{
|
{
|
||||||
|
str = str.Replace("\\", "\u2572").Replace("-","\u2011");
|
||||||
int pos = savRTF.Find(str, startpos, _FindOptions);
|
int pos = savRTF.Find(str, startpos, _FindOptions);
|
||||||
keepgoing = false;
|
keepgoing = false;
|
||||||
if (pos >= 0)
|
if (pos >= 0)
|
||||||
|
@ -98,8 +98,9 @@ namespace Volian.Controls.Library
|
|||||||
grd.SetSearchCell(SearchString);
|
grd.SetSearchCell(SearchString);
|
||||||
}
|
}
|
||||||
// convert the '-' to the unicode non-breaking dash (\u8209? or \u2011 hex)
|
// convert the '-' to the unicode non-breaking dash (\u8209? or \u2011 hex)
|
||||||
|
// and the '\' to the unicode backslash sybol (\u9586? or \u2572 hex)
|
||||||
if (!SelectedEditItem.MyStepRTB.IsRoTable)
|
if (!SelectedEditItem.MyStepRTB.IsRoTable)
|
||||||
SelectedEditItem.MyStepRTB.Find(SearchString.Replace('-','\u2011'));
|
SelectedEditItem.MyStepRTB.Find(SearchString.Replace('-', '\u2011').Replace('\\','\u2572'));
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Contructors
|
#region Contructors
|
||||||
|
@ -3660,6 +3660,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
// Now change the Unicode symbols to DOS symbols
|
// Now change the Unicode symbols to DOS symbols
|
||||||
stepText = stepText.Replace(@"\u8209?", "-");
|
stepText = stepText.Replace(@"\u8209?", "-");
|
||||||
|
stepText = stepText.Replace(@"\u9586?", "\\");
|
||||||
stepText = stepText.Replace(@"\u9474?", "\xB3"); // Vert Line graphic character
|
stepText = stepText.Replace(@"\u9474?", "\xB3"); // Vert Line graphic character
|
||||||
stepText = stepText.Replace(@"\'b0", "\xB0");
|
stepText = stepText.Replace(@"\'b0", "\xB0");
|
||||||
stepText = stepText.Replace(@"\up2 ", "\x9566");
|
stepText = stepText.Replace(@"\up2 ", "\x9566");
|
||||||
|
@ -1217,7 +1217,7 @@ namespace Volian.Controls.Library
|
|||||||
string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
|
string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
|
||||||
DirectoryInfo di = new DirectoryInfo(PEIPath);
|
DirectoryInfo di = new DirectoryInfo(PEIPath);
|
||||||
if (!di.Exists) di.Create();
|
if (!di.Exists) di.Create();
|
||||||
string fileName = PEIPath + "\\Approved_Rev_" + ri.RevisionNumber.Replace(" ","_") + "_" + xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ","_").Replace(@"\u8209?", "-")+".pxml";
|
string fileName = PEIPath + "\\Approved_Rev_" + ri.RevisionNumber.Replace(" ","_") + "_" + xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ","_").Replace(@"\u8209?", "-").Replace(@"\u9586?","_")+".pxml";
|
||||||
xd.Save(fileName);
|
xd.Save(fileName);
|
||||||
MessageBox.Show("Approved procedure saved to import file " + fileName,"Saving TempMod", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show("Approved procedure saved to import file " + fileName,"Saving TempMod", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user