コード例 #1
0
        /// <inheritdoc />
        public bool IsAppointmentInRange(AppointmentData item, DateTime start, DateTime end)
        {
            if (item.Start == item.End && item.Start >= start && item.End < end)
            {
                return(true);
            }

            return(item.End > start && item.Start < end);
        }
コード例 #2
0
        /// <inheritdoc />
        public RenderFragment RenderAppointment(AppointmentData item)
        {
            if (Template != null)
            {
                TItem context = (TItem)item.Data;
                return(Template(context));
            }

            return(builder => builder.AddContent(0, item.Text));
        }
コード例 #3
0
        /// <inheritdoc />
        public IDictionary <string, object> GetAppointmentAttributes(AppointmentData item)
        {
            var args = new SchedulerAppointmentRenderEventArgs <TItem> {
                Data = (TItem)item.Data, Start = item.Start, End = item.End
            };

            AppointmentRender?.Invoke(args);

            return(args.Attributes);
        }
コード例 #4
0
 /// <inheritdoc />
 public async Task SelectAppointment(AppointmentData data)
 {
     await AppointmentSelect.InvokeAsync(new SchedulerAppointmentSelectEventArgs <TItem> {
         Start = data.Start, End = data.End, Data = (TItem)data.Data
     });
 }