public EditAppointmentForm(Appointment appointment, AppointmentInformationForm appointmentInformationForm, CalendarForm calendarForm, AppointmentsInDayForm appointmentsInDayForm, AppointmentController appointmentController, UserController userController) { InitializeComponent(); this.appointment = appointment; appointmentInformation = appointmentInformationForm; calendar = calendarForm; appointmentsInDay = appointmentsInDayForm; AddUserNamesToLists(); SetPreviousValues(); notInvitedUserNamesListBox.DataSource = notInvitedUserNames; invitedUserNamesListBox.DataSource = invitedUserNames; this.appointmentController = appointmentController; this.userController = userController; }
public AppointmentInformationForm(Appointment appointment, CalendarForm calendarForm, AppointmentController appointmentController, UserController userController, AppointmentsInDayForm appointmentsInDayForm = null) { InitializeComponent(); if (appointment == null) { throw new ArgumentNullException("appointment"); } this.appointment = appointment; calendar = calendarForm; if (appointmentsInDayForm != null) { appointmentsInDayForm.Close(); } FillFields(); HideOwnerButtonsIfLoggedUserDoesNotOwnTheAppointment(); this.appointmentController = appointmentController; this.userController = userController; }