Example #1
0
 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
Example #2
0
def IsProjectYearFolderName(folderName):
    return (len(folderName) == 2 and Char.IsDigit(folderName[0])
            and Char.IsDigit(folderName[1]))