コード例 #1
0
ファイル: ValidationSetupUI.cs プロジェクト: rkm/RDMP
        private void SecondaryConstraintRequestDelete(object sender)
        {
            var toDelete = (sender as SecondaryConstraintUI).SecondaryConstriant;

            SelectedColumnItemValidator.SecondaryConstraints.Remove(toDelete);
            tableLayoutPanel1.Controls.Remove(sender as Control);
            ObjectSaverButton1.Enable(true);
        }
コード例 #2
0
ファイル: SqlProcessTaskUI.cs プロジェクト: HDRUK/RDMP
        private void ScintillaOnSavePointLeft(object sender, EventArgs eventArgs)
        {
            if (_bLoading)
            {
                return;
            }

            ObjectSaverButton1.Enable(true);
        }
コード例 #3
0
ファイル: ValidationSetupUI.cs プロジェクト: rkm/RDMP
        private void btnAddSecondaryConstraint_Click(object sender, EventArgs e)
        {
            if (SelectedColumnItemValidator == null)
            {
                MessageBox.Show("You must select a column on the left first");
                return;
            }

            if (ddSecondaryConstraints.SelectedItem != null)
            {
                var secondaryConstriant =
                    Validator.CreateConstraint(ddSecondaryConstraints.Text, Consequence.Missing) as SecondaryConstraint;

                SelectedColumnItemValidator.SecondaryConstraints.Add(secondaryConstriant);
                AddSecondaryConstraintControl(secondaryConstriant);
                ObjectSaverButton1.Enable(true);
            }
        }
コード例 #4
0
ファイル: ValidationSetupUI.cs プロジェクト: rkm/RDMP
        private void ddPrimaryConstraints_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (bSuppressChangeEvents)
            {
                return;
            }

            if (SelectedColumnItemValidator == null)
            {
                return;
            }

            bSuppressChangeEvents = true;

            if (ddPrimaryConstraints.Text == _noPrimaryConstraintText)
            {
                SelectedColumnItemValidator.PrimaryConstraint = null;
                ddConsequence.SelectedItem = Consequence.Missing;
            }
            else
            {
                try
                {
                    SelectedColumnItemValidator.PrimaryConstraint =
                        Validator.CreateConstraint(ddPrimaryConstraints.Text, (Consequence)ddConsequence.SelectedValue) as PrimaryConstraint;
                }
                catch (Exception ex)
                {
                    ExceptionViewer.Show("Failed to create PrimaryConstraint '" + ddPrimaryConstraints.Text + "'", ex);
                }
            }

            //Make consequence selection only possible if there is a priary constraint selected
            ddConsequence.Enabled = ddPrimaryConstraints.Text != _noPrimaryConstraintText;


            bSuppressChangeEvents = false;
            ObjectSaverButton1.Enable(true);
        }
コード例 #5
0
ファイル: ValidationSetupUI.cs プロジェクト: rkm/RDMP
        private void ddConsequence_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (bSuppressChangeEvents)
            {
                return;
            }

            if (SelectedColumnItemValidator != null)
            {
                if (SelectedColumnItemValidator.PrimaryConstraint != null)
                {
                    SelectedColumnItemValidator.PrimaryConstraint.Consequence = (Consequence)ddConsequence.SelectedValue;
                    ObjectSaverButton1.Enable(true);
                }
                else
                {
                    MessageBox.Show("you must select a primary constraint first");

                    bSuppressChangeEvents      = true;
                    ddConsequence.SelectedItem = Consequence.Missing;
                    bSuppressChangeEvents      = false;
                }
            }
        }