Esempio n. 1
0
 public void show(int pmID)
 {
     base.show();
     program.projectID = pmID;
     StringValidationRule rule = new StringValidationRule();
     rule.maxLength = Program.PRNAME_MAX_LENGTH;
     Ut.bind(program, "name", BindingMode.TwoWay, programNameTextBox, TextBox.TextProperty
         , new List<ValidationRule>() { rule });
 }
Esempio n. 2
0
 protected bool checkUIElementValid()
 {
     StringValidationRule rule = new StringValidationRule();
     rule.maxLength = Program.PRNAME_MAX_LENGTH;
     ValidationResult result = rule.Validate(programNameTextBox.Text, null);
     if (!result.IsValid)
         return false;
     return true;
 }