private void calendar1_LoadItems_1(object sender, CalendarLoadEventArgs e)
        {
            if (_data.ScheduledItems.Count > 0)
            {
                PlaceItems();
            }

            SetScrollValues();
        }
Пример #2
0
 /// <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);
            }
        }
Пример #4
0
        /// <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);
                }
            }
        }
Пример #5
0
 void oCalendario2_LoadItems(object sender, CalendarLoadEventArgs e)
 {
     ColocarItems2();//Coloca los ítems creados en el calendario
 }
Пример #6
0
 private void calendar1_LoadItems(object sender, CalendarLoadEventArgs e)
 {
     PlaceItems();
 }
Пример #7
0
 private void calendar1_LoadItems(object sender, CalendarLoadEventArgs e)
 {
     calendar1.Items.AddRange(loadedItems);
 }
Пример #8
0
 private void calendar1_LoadItems(object sender, CalendarLoadEventArgs e)
 {
     PlaceItems();
     lblMonth.Text = calendar1.ViewStart.AddDays(15).ToString("MMMM yyyy");
 }
Пример #9
0
 private void calendar1_LoadItems(object sender, CalendarLoadEventArgs e)
 {
     PlaceItems();
     //LoadingCalendar("Status");
 }
Пример #10
0
 protected virtual void OnLoadItems(CalendarLoadEventArgs e)
 {
     if (LoadItems != null)
     {
         LoadItems(this, e);
     }
 }
Пример #11
0
 /// <summary>
 /// Loads all calendar items
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void calendar_LoadItems(object sender, CalendarLoadEventArgs e)
 {
     SetAllLabels();
     AddAppointmentsToCalendar();
 }
Пример #12
0
 private void calendar_LoadItems(object sender, CalendarLoadEventArgs e)
 {
     ShowItems();
 }