private void BT_AddAppointment_Click(object sender, RoutedEventArgs e) { Schedule_AddAppointmentWindow sapw = new Schedule_AddAppointmentWindow("", dayIndex, startTime, endTime); if (sapw.ShowDialog() == true) { ScheduleManager.AddAppointment(sapw.GetAppointment()); } }