private void StartReplace_Click(object sender, EventArgs e) { caretPosition = text.SelectionStart == text.Text.Length ? 0 : text.SelectionStart; TextLogic.Replace(ref text, toSearch.Text, toReplace.Text, ref caretPosition, isCaseSensetive.Checked, isFromStart.Checked); }
private void ReplaceAll_Click(object sender, EventArgs e) { caretPosition = text.SelectionStart; TextLogic.ReplaceAll(ref text, toSearch.Text, toReplace.Text, isCaseSensetive.Checked, isFromStart.Checked); }
private void StartSeacrh_Click(object sender, EventArgs e) { caretPosition = text.SelectionStart == text.Text.Length ? 0 : text.SelectionStart + (isFromStart.Checked ? toSearch.Text.Length : 0); TextLogic.Find(ref text, toSearch.Text, ref caretPosition, isCaseSensetive.Checked, isFromStart.Checked); }