示例#1
0
        /// <summary>
        /// An event that should be called to update data shown to a user in the calendar
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">An appointment event with all the data about the appointment</param>
        private void UpdateInformation(object sender, ApppointmentEventArgs e)
        {
            if (panelHideInfo.Visible)
            {
                panelHideInfo.Hide();
            }
            lastSelectedAppointment = selectedAppointment;
            selectedAppointment     = e.Appointment;

            HighLightSelectedAppointment();

            informationLabel.Text           = selectedAppointment.LabelAppointment.Text;
            dateInformationLabel.Text       = selectedAppointment.DateFormat;
            timeInformationLabel.Text       = selectedAppointment.TimeFormat;
            instructorInformationLabel.Text = selectedAppointment.InstructorName;
            warningInformationTextbox.Hide();
            warningTitleLabel.Hide();

            List <User> usersOnAppointment = DatabaseParser.GetUsersOnAppointmentID(selectedAppointment.Id);

            CheckIfUserCanBookLesson(usersOnAppointment);
            bookInformationLabel.Text = BookInformation(usersOnAppointment);
        }
 /// <summary>
 /// Invoking all events when clicked if any is subscribed
 /// </summary>
 /// <param name="e"></param>
 private void label_Clicked(ApppointmentEventArgs e)
 {
     ClickOnAppointmentTriggered?.Invoke(this, e);
 }