예제 #1
0
        private bool HighlightNextError()
        {
            int start = ValueToRepairTextBox.SelectionStart;

            if (ValueToRepairTextBox.SelectionLength > 0)
            {
                start++;
            }
            if (BadCharacter == MainForm.BadCharacter)
            {
                start = 0; // never let a true bad character pass
            }
            int inx = ValueToRepairTextBox.Text.IndexOf(BadCharacter, start);

            if (inx < 0)
            {
                return(false);
            }
            ValueToRepairTextBox.SelectionStart  = inx;
            ValueToRepairTextBox.SelectionLength = 1;
            ValueToRepairTextBox.ScrollToCaret();
            ValueToRepairTextBox.Focus();
            return(true);
        }
예제 #2
0
 private void ReplaceButton_Click(object sender, EventArgs e)
 {
     ValueToRepairTextBox.Paste((sender as Button).Tag as string);
     ValueToRepairTextBox.Focus();
 }