public override bool ValidateChildren()
        {
            if (string.IsNullOrWhiteSpace(DatabaseFileEdit.Text))
            {
                Resources.SelectDatabaseFile.ShowError();
                DatabaseFileBtn.Focus();
                return(false);
            }

            return(true);
        }
예제 #2
0
        public override bool ValidateChildren()
        {
            if (string.IsNullOrWhiteSpace(ServerNameEdit.Text))
            {
                Resources.ServerNameCannotBeEmptyOrWhitesp.ShowError();
                ServerNameEdit.Focus();
                return(false);
            }

            if (UserNameEdit.Enabled && string.IsNullOrWhiteSpace(UserNameEdit.Text))
            {
                Resources.UserNameCannotBeEmptyOrWhitespace.ShowError();
                UserNameEdit.Focus();
                return(false);
            }

            if (PasswordEdit.Enabled && string.IsNullOrWhiteSpace(PasswordEdit.Text))
            {
                Resources.PasswordCannotBeEmptyOrWhitespace.ShowError();
                PasswordEdit.Focus();
                return(false);
            }

            if (DatabaseNameEdit.Enabled && string.IsNullOrWhiteSpace(DatabaseNameEdit.Text))
            {
                Resources.DatabaseNameCannotBeEmptyOrWhitespace.ShowError();
                DatabaseNameEdit.Focus();
                return(false);
            }

            if (DatabaseFileEdit.Enabled && string.IsNullOrWhiteSpace(DatabaseFileEdit.Text))
            {
                Resources.SelectDatabaseFile.ShowError();
                DatabaseFileBtn.Focus();
                return(false);
            }

            if (DatabaseLogicalNameEdit.Enabled && string.IsNullOrWhiteSpace(DatabaseLogicalNameEdit.Text))
            {
                Resources.DatabaseNameCannotBeEmptyOrWhitespace.ShowError();
                DatabaseLogicalNameEdit.Focus();
                return(false);
            }

            return(true);
        }