SchedulerResource
Namespace: Wisej.Web.Ext.FullCalendar
Assembly: Wisej.Web.Ext.FullCalendar (4.1.0.0)
Represents a resource in the FullCalendar control when using the scheduler commercial plug in.
- C#
- VB.NET
public class SchedulerResource
Public Class SchedulerResource
Assign the resources to Resources and associate the events to a resource using ResourceId. The resources are used only when SchedulerLicenseKey is set.
Example:
Creating a hierarchy of resources:
this.fullCalendar1.SchedulerLicenseKey = "GPL-My-Project-Is-Open-Source";
this.fullCalendar1.Resources = new[] {
new SchedulerResource("building1")
{
Title = "Building 1",
Children = new[] {
new SchedulerResource("room101") { Title = "Room 101" },
new SchedulerResource("room102") { Title = "Room 102" }
}
}
};
this.fullCalendar1.View = ViewType.TimelineWeek;
Constructors
SchedulerResource()
Constructs a new instance of SchedulerResource.
SchedulerResource(id)
Constructs a new instance of SchedulerResource.
| Name | Type | Description |
|---|---|---|
| id | String | A string that represents the ID of this resource. |
Throws:
- ArgumentNullException id is null or empty.
Properties
Children
SchedulerResource[]: Returns or sets the child resources. (Default: null)
Child resources are displayed nested under this resource in the timeline views. Changing the value fires ResourceChanged on the owner calendar but doesn't redraw it: call Update() on the calendar to show the change.
Example:
Adding child resources:
var team = new SchedulerResource("team") { Title = "Support team" };
team.Children = new[] {
new SchedulerResource("alice") { Title = "Alice" },
new SchedulerResource("bob") { Title = "Bob" }
};
this.fullCalendar1.Resources = new[] { team };
EventBackgroundColor
Color: Returns or sets the background color for the events associated to this resource. (Default: Color [Empty])
Changing the value fires ResourceChanged on the owner calendar but doesn't redraw it: call Update() on the calendar to show the change.
EventBorderColor
Color: Returns or sets the border color for the events associated to this resource. (Default: Color [Empty])
Changing the value fires ResourceChanged on the owner calendar but doesn't redraw it: call Update() on the calendar to show the change.
EventClassName
String: Returns or sets the CSS class name (or several names separated by spaces) that will be attached to the elements of the events associated to this resource. (Default: "")
Changing the value fires ResourceChanged on the owner calendar but doesn't redraw it: call Update() on the calendar to show the change.
EventTextColor
Color: Returns or sets the text color for the events associated to this resource. (Default: Color [Empty])
Changing the value fires ResourceChanged on the owner calendar but doesn't redraw it: call Update() on the calendar to show the change.
Id
String: Returns or sets the unique ID for this resource. It's used by ResourceId to associate the event to the resource. (Default: null)
An empty string is converted to null.
Owner
FullCalendar: Returns the FullCalendar that owns this resource.
The owner is set when the resource is assigned to Resources. Resources in Children don't have an owner.
Title
String: Returns or sets the title of this resource. (Default: "")
The title is displayed in the resource area of the timeline views. An empty string is converted to null.
UserData
Object: Returns a dynamic object that can be used to store custom data.
The object is created the first time the property is read.
Example:
Storing the employee number of the resource:
var resource = new SchedulerResource("alice") { Title = "Alice" };
resource.UserData.EmployeeNumber = "E-1024";