Command Line switch to skip ReplaceWords function (Edit and Print)

Added Hanging Indent Logic for Grids.
This commit is contained in:
Rich
2014-10-08 20:13:15 +00:00
parent d8b0f21619
commit cb355b71aa
2 changed files with 56 additions and 0 deletions

View File

@@ -1706,8 +1706,27 @@ namespace Volian.Controls.Library
//}
#endregion
private Dictionary<ReplaceStr, Regex> dicReplaceRegex = new Dictionary<ReplaceStr, Regex>();
private static bool? _ProcessReplaceWords;
public static bool ProcessReplaceWords
{
get
{
if (_ProcessReplaceWords == null)
{
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
_ProcessReplaceWords = true;
foreach (string parameter in parameters)
{
if (parameter.ToUpper() == "/NRW")
_ProcessReplaceWords = false;
}
}
return (bool) _ProcessReplaceWords;
}
}
private string DoReplaceWords2(string Text)
{
if(!ProcessReplaceWords) return Text;
if (_MyItemInfo.MyContent.Type < 20000) return Text; // for now only replace in steps.
FoundMatches myMatches = new FoundMatches(Text,_MyItemInfo.FormatStepData.Font,_MyItemInfo);
// Exclude Link Text from Replace Word process