Example #1
0
        private void OnClosing(object sender, FormClosingEventArgs e)
        {
            Validator v = new Validator(enableValue);

            v.AddConstraint(new NotConfiguredConstraint());

            e.Cancel = !MakeValidation(v);
        }
Example #2
0
        private bool CheckInput()
        {
            Validator v = new Validator(enableValue);

            v.AddConstraint(new DatabaseConstraint(databaseLocationValue));

            bool isOK = MakeValidation(v);

            DialogResult = (isOK) ? DialogResult.OK : DialogResult.None;

            return(isOK);
        }