Exemple #1
0
        /// <summary>
        /// Check if string is all numerals
        /// If not reset value to '00'
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TextboxValueCheck(object sender, TextChangedEventArgs e)
        {
            TextBox txt = (TextBox)sender;

            if (!HelperMethods.AreAllValidNumericChars(txt.Text))
            {
                txt.Text       = "00";
                txt.CaretIndex = txt.Text.Length;
            }
        }