예제 #1
0
 public override bool InputControl(string fullText)
 {
     if (fullText.Length == 1)
     {
         if ("-".Equals(fullText) || RegexCheck.IsDecimal(fullText))
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     return(RegexCheck.IsDecimal(fullText) || (fullText.Count(c => c == '.') == 1 && fullText.IndexOf('.') == fullText.Length - 1 && fullText.IndexOf("-.") < 0));//有一个小数点且在末尾
 }