Esempio n. 1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     softwareProject = new SoftwareProject()
     {
         name = "Priority Status", status = ReviewStatus.pending
     };
     softwareProject.addReviewHandler(5, Project_EventHandler);
     softwareProject.addReviewHandler(9, Project_EventHandler);
     softwareProject.addReviewHandler(1, Project_EventHandler);
     textBox2.Text      = account.balance.ToString();
     account.Overdrawn += Account_Overdrawn;
 }
Esempio n. 2
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;
            }
        }