public override bool Edit(IPolicyEditArgs policyEditArgs)
        {
            if (Config == null)
            {
                Config = new CodeReviewPolicyConfig()
                {
                    FailIfAnyResponseIsNeedsWork = true,
                    RequireReviewToBeClosed = true,
                    MinPassLevel = PassLevel.LooksGood
                };
            }

            using (var form = new CodeReviewPolicyForm(Config, policyEditArgs.TeamProject.TeamProjectCollection.GetService<VersionControlServer>()))
            {
                var res = form.ShowDialog(policyEditArgs.Parent);
                if (res == DialogResult.OK)
                {
                    Config = form.Config;
                    return true;
                }
                return false;
            }
        }
Ejemplo n.º 2
0
        public override bool Edit(IPolicyEditArgs policyEditArgs)
        {
            if (Config == null)
            {
                Config = new CodeReviewPolicyConfig()
                {
                    FailIfAnyResponseIsNeedsWork = true,
                    RequireReviewToBeClosed      = true,
                    MinPassLevel = PassLevel.LooksGood
                };
            }

            using (var form = new CodeReviewPolicyForm(Config, policyEditArgs.TeamProject.TeamProjectCollection.GetService <VersionControlServer>()))
            {
                var res = form.ShowDialog(policyEditArgs.Parent);
                if (res == DialogResult.OK)
                {
                    Config = form.Config;
                    return(true);
                }
                return(false);
            }
        }