public void ReplaceAll(Control ctl, string str, string strReplace, bool matchCase)
{
if (_CurrentTab != DesignTabs.Edit)
return;
scintilla1.TargetStart = 0;
scintilla1.TargetEnd = scintilla1.TextLength;
scintilla1.SearchFlags = matchCase ? SearchFlags.MatchCase : SearchFlags.None;
while (scintilla1.SearchInTarget(str) != -1)
{
scintilla1.ReplaceTarget(strReplace);
// Search the remainder of the document
scintilla1.TargetStart = scintilla1.TargetEnd;
scintilla1.TargetEnd = scintilla1.TextLength;
}
}