コード例 #1
0
 public UpdateConference(Form parent, int positionX, int positionY)
 {
     InitializeComponent();
     Location              = new Point(positionX, positionY);
     this.parent           = parent;
     preliminaryController = ApplicationFactory.getPreliminaryPhaseController();
     activeConference      = preliminaryController.ActiveConference();
     validator             = new ConferenceValidator();
 }
コード例 #2
0
        public ConferenceDetails()
        {
            InitializeComponent();
            PreliminaryPhaseController preliminaryController = ApplicationFactory.getPreliminaryPhaseController();

            activeConference = preliminaryController.ActiveConference();
            if (activeConference == null)
            {
                richTextBox1.Text = "Currently, there is no active conference!";
            }
            else
            {
                richTextBox1.Text  = "Conference details:\n\n";
                richTextBox1.Text += "Conference name: " + activeConference.Name + "\n\n";
                richTextBox1.Text += "Conference fee: " + activeConference.ConferenceFee + "\n\n";
                richTextBox1.Text += "Conference commitee:\n";

                foreach (ConferenceUser confUser in activeConference.Users)
                {
                    User user = preliminaryController.FindUserById(confUser.UserId);
                    richTextBox1.Text += user.LastName + " " + user.FirstName + "\n";
                }

                richTextBox1.Text += "\n\nConference topics:\n";

                foreach (Topic topic in activeConference.Topics)
                {
                    richTextBox1.Text += topic.Name + "\n";
                }

                switch (activeConference.ActivePhase.Name)
                {
                case "PRELIMINARY":
                    richTextBox1.Text += "\nConference is currently in PRELIMINARY phase!";
                    richTextBox1.Text += "\nDeadline for this phase: " + activeConference.ActivePhase.Deadline.ToString() + "\n";
                    break;

                case "PHASEONE":
                    richTextBox1.Text += "\nConference is currently in PHASE ONE!";
                    richTextBox1.Text += "\nDeadline for this phase: " + activeConference.ActivePhase.Deadline.ToString() + "\n";
                    break;

                case "PHASETWO":
                    richTextBox1.Text += "\nConference is currently in PHASE TWO!";
                    richTextBox1.Text += "\nDeadline for this phase: " + activeConference.ActivePhase.Deadline.ToString() + "\n";
                    break;

                case "PHASETHREE":
                    richTextBox1.Text += "\nConference is currently in PHASE THREE!";
                    richTextBox1.Text += "\nDeadline for this phase: " + activeConference.ActivePhase.Deadline.ToString() + "\n";
                    break;
                }
            }
        }
コード例 #3
0
        public void updateStatus()
        {
            Conference conference = preliminaryController.ActiveConference();

            if (conference == null)
            {
                Size = new System.Drawing.Size(347, 194);
                buttonCreateConference.Visible = true;
                buttonLogout.Size           = new System.Drawing.Size(278, 102);
                buttonLogout.Location       = new System.Drawing.Point(27, 159);
                labelConferenceDetails.Text = "No conference has been created!";
            }
            else
            {
                Size = new System.Drawing.Size(347, 262);
                buttonUpdateConference.Visible = true;
                buttonStartConference.Visible  = true;
                buttonLogout.Size           = new System.Drawing.Size(278, 43);
                buttonLogout.Location       = new System.Drawing.Point(27, 218);
                labelConferenceDetails.Text = "A conference has been created is waiting to be submitted!";
            }

            labelWelcome.Text = "Welcome " + loggedUser.LastName + " " + loggedUser.FirstName;
        }