private void calendar1_LoadItems_1(object sender, CalendarLoadEventArgs e) { if (_data.ScheduledItems.Count > 0) { PlaceItems(); } SetScrollValues(); }
/// <summary> /// Handles the LoadItems event of the calendar1 control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="WindowsFormsCalendar.CalendarLoadEventArgs"/> instance containing the event data.</param> private void calendar1_LoadItems(object sender, CalendarLoadEventArgs e) { foreach (CalendarItem calendarItem in _items) { if (this.calendar1.ViewIntersects(calendarItem)) { this.calendar1.Items.Add(calendarItem); } } }
private void calendar_LoadItems(object sender, CalendarLoadEventArgs e) { AddAppointmentsToCalendar(); //Color logic here var items = e.Calendar.Items; var systemColors = new ColorConverter().GetStandardValues(); List <Color> colors = systemColors.Cast <Color>().ToList(); int colorJump = 50; foreach (var i in items) { APTDETAILS appointment = (APTDETAILS)i.Tag; int colorIndex = appointment.APD_USER + colorJump; Color color = colors[colorIndex]; i.ApplyColor(color); } }
/// <summary>Handles the LoadItems event of the calendar1 control.</summary> private void calendar1_LoadItems(object sender, CalendarLoadEventArgs e) { var start = monthView1.SelectionStart; var end = monthView1.SelectionEnd; foreach (var student in Person.GetActiveStudents()) { var schedule = Schedule.GetScheduleFromStudentId(student.PersonID); var dayOfWeek = (DayOfWeek)schedule.DayOfTheWeek; var scheduleDays = Schedule.GetDayOfWeekDatesBetween(start, end, dayOfWeek); var timeSpan = schedule.TimeOfDay.Value; foreach (var scheduleDay in scheduleDays) { var span = new TimeSpan(0, 0, 30, 0, 0); var dt = scheduleDay.Date + timeSpan; var calendarItem = new CalendarItem(calendar1, dt, span, student.FirstLast); calendarItem.ApplyColor(Color.DarkTurquoise); calendar1.Items.Add(calendarItem); } } }
void oCalendario2_LoadItems(object sender, CalendarLoadEventArgs e) { ColocarItems2();//Coloca los ítems creados en el calendario }
private void calendar1_LoadItems(object sender, CalendarLoadEventArgs e) { PlaceItems(); }
private void calendar1_LoadItems(object sender, CalendarLoadEventArgs e) { calendar1.Items.AddRange(loadedItems); }
private void calendar1_LoadItems(object sender, CalendarLoadEventArgs e) { PlaceItems(); lblMonth.Text = calendar1.ViewStart.AddDays(15).ToString("MMMM yyyy"); }
private void calendar1_LoadItems(object sender, CalendarLoadEventArgs e) { PlaceItems(); //LoadingCalendar("Status"); }
protected virtual void OnLoadItems(CalendarLoadEventArgs e) { if (LoadItems != null) { LoadItems(this, e); } }
/// <summary> /// Loads all calendar items /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void calendar_LoadItems(object sender, CalendarLoadEventArgs e) { SetAllLabels(); AddAppointmentsToCalendar(); }
private void calendar_LoadItems(object sender, CalendarLoadEventArgs e) { ShowItems(); }