def limit_to_decimal_digits(sender, event): if not Char.IsDigit(event.KeyChar) and \ not Char.IsControl(event.KeyChar) and \ not event.KeyChar == '.' and \ not event.KeyChar == '-': event.Handled = True if event.KeyChar == '.' and '.' in sender.Text: event.Handled = True
def IsProjectYearFolderName(folderName): return (len(folderName) == 2 and Char.IsDigit(folderName[0]) and Char.IsDigit(folderName[1]))