Ejemplo n.º 1
0
        public int Replace(string strOld, string strNew, bool positive)
        {
            int pos = _seacherManager.Search(strOld, positive);

            if (pos != -1)
            {
                _editor.TargetStart = pos; //set targt ready to replace string
                _editor.TargetEnd   = pos + strOld.Length;
                _editor.ReplaceTarget(strNew);
                _editor.SetSelection(pos, pos + strNew.Length);
            }
            return(pos);
        }
Ejemplo n.º 2
0
 public int Search(string text, bool positive)
 {
     return(_searchManager.Search(text, positive));
 }