fyiReporting.RdlDesign.RdlEditPreview.ReplaceNext C# (CSharp) Method

ReplaceNext() public method

public ReplaceNext ( Control ctl, string str, string strReplace, bool matchCase ) : void
ctl System.Windows.Forms.Control
str string
strReplace string
matchCase bool
return void
        public void ReplaceNext(Control ctl, string str, string strReplace, bool matchCase)
        {
            if (_CurrentTab != DesignTabs.Edit)
                return;

            if (String.Compare(scintilla1.SelectedText, str, !matchCase) == 0)
            {
                scintilla1.ReplaceSelection(strReplace);
            }
            else
            {
                FindNext(ctl, str, matchCase, false);
                if (String.Compare(scintilla1.SelectedText, str, !matchCase) == 0)
                    scintilla1.ReplaceSelection(strReplace);
            }
        }

Usage Example

Esempio n. 1
0
 private void btnReplace_Click(object sender, System.EventArgs e)
 {
     rdlEdit.FindNext(this, txtFindR.Text, chkCase.Checked);
     rdlEdit.ReplaceNext(this, txtFindR.Text, txtReplace.Text, chkCase.Checked);
     txtFindR.Focus();
 }