BlueSky.Windows.FindReplaceWindow.replaceallbutton_Click C# (CSharp) Method

replaceallbutton_Click() private method

private replaceallbutton_Click ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
return void
        private void replaceallbutton_Click(object sender, RoutedEventArgs e)
        {
            if (_ow == null) return;
            bool foundanother = true;
            string replacetext = replacetxt.Text != null ? replacetxt.Text : string.Empty; ;

            string findtext = findtxt.Text != null ? findtxt.Text : string.Empty;
            do
            {
                foundanother = _ow.ReplaceWith(findtext, replacetext);
            } while (foundanother);
            MessageBox.Show(this,"No more to replace.");
        }