Esempio n. 1
0
        private void Project_EventHandler(SoftwareProject project, ReviewEventArgs args)
        {
            string message = "Priority Review" + args.Priority.ToString();

            switch (MessageBox.Show(message, "Review", MessageBoxButtons.YesNoCancel))
            {
            case DialogResult.Yes:
                args.Project.status = ReviewStatus.Approved;
                break;

            case DialogResult.No:
                args.Project.status = ReviewStatus.rejected;
                break;
            }
        }
Esempio n. 2
0
        public void OnReviewEvent()
        {
            ReviewEventArgs reviewEventArgs = new ReviewEventArgs()
            {
                Project = this
            };

            foreach (ReviewHandlerInfo info in reviewHandlers)
            {
                if (this.status != ReviewStatus.pending)
                {
                    break;
                }
                reviewEventArgs.Priority = info.Priority;
                info.Handler(this, reviewEventArgs);
            }
        }