private void butReplaceAll_Click(object sender, EventArgs e) // Кнопка "Заменить всё" { MainForm main = this.Owner as MainForm; if (main != null) { if (cbReg.CheckState == CheckState.Checked) { TextWork.ReplaceAllTextBox(ref main.notebox, tbFind.Text, tbReplace.Text, true); } else { TextWork.ReplaceAllTextBox(ref main.notebox, tbFind.Text, tbReplace.Text, false); } } }
private void butFind_Click(object sender, EventArgs e) // Кнопка "Найти" { MainForm main = this.Owner as MainForm; if (main != null) { if (cbReg.CheckState == CheckState.Checked) { TextWork.FindTextBox(ref main.notebox, tbFind.Text, ref findCutLength, true); } else { TextWork.FindTextBox(ref main.notebox, tbFind.Text, ref findCutLength, false); } } }