Exemplo n.º 1
0
        private void validateButton_Click(object sender, EventArgs e)
        {
            bool shouldValidate;

            using (ValidateForm vf = new ValidateForm())
            {
                vf.Text                   = Util.GetTitle();
                vf.activeState            = activeState;
                vf.documentType           = GetDocumentType();
                vf.selectedValidationType = selectedValidationType;
                vf.ShowDialog();
                selectedValidationType = vf.selectedValidationType;
                shouldValidate         = vf.shouldValidate;
            }

            if (shouldValidate)
            {
                if (ValidateDocument(selectedValidationType))
                {
                    Util.ShowMessage(string.Format("{0} document validated successfully.", GetDocumentType()));
                    CloseStatusBox();
                }
            }
        }
        private void validateButton_Click(object sender, EventArgs e)
        {
            bool shouldValidate;

            using (ValidateForm vf = new ValidateForm())
            {
                vf.Text = Util.GetTitle();
                vf.activeState = activeState;
                vf.documentType = GetDocumentType();
                vf.selectedValidationType = selectedValidationType;
                vf.ShowDialog();
                selectedValidationType = vf.selectedValidationType;
                shouldValidate = vf.shouldValidate;
            }

            if (shouldValidate)
            {
                if (ValidateDocument(selectedValidationType))
                {
                    Util.ShowMessage(string.Format("{0} document validated successfully.", GetDocumentType()));
                    CloseStatusBox();
                }
            }
        }