[]
        
(Showing Draft Content)

Resources

A resource is a keyword or phrase that identifies an item or support required for an appointment. Resources are stored in the ResourceCollection class.

An appointment can have one or more associated resources.


Assigning Resources to an Appointment

Assign resources in code or at run time through the Resources dialog box.

The following code in the Form_Load event creates a Digital Projector resource and assigns it to the appointment.

// Add a new appointment.          
C1.C1Schedule.Appointment app;        
app = this.c1Schedule1.DataStorage.AppointmentStorage.Appointments.Add();
// Set some details for the appointment.          
app.Subject = "Meeting";        
app.Location = "Large Conference Room";        
app.Duration = TimeSpan.FromMinutes(45);        
app.Start = new DateTime(2007, 2, 28, 13, 30, 0);
// Create the Digital Projector resource.          
C1.C1Schedule.ResourceCollection rescol;         
rescol = this.c1Schedule1.DataStorage.ResourceStorage.Resources;         
C1.C1Schedule.Resource roomres = new C1.C1Schedule.Resource();         
roomres.Text = "Digital Projector"; 
// Insert the resource into the Master Resource List.          
rescol.Insert(0, roomres); 
// Assign the resource to the appointment.          
app.Resources.Add(roomres);

To assign resources at run time:

  1. Open the appointment in the Appointment dialog box.

  2. Select Resources to open the Resources dialog box.

  3. Select the resources to associate with the appointment.

  4. Select OK.

C1WinForms Scheduler resources dialog box

C1WinForms Scheduler resources dialog box - adding categories demo

Note: By default, the Resources dialog box does not contain any resources. Add resources to the Master Resource List before assigning them to an appointment.


Adding Resources to the Master Resource List

C1Schedule supports resources created in code or at run time through the Master Resource List dialog box.

The following code in the Form_Load event creates a Digital Projector resource.

// Create the Digital Projector resource.         
C1.C1Schedule.ResourceCollection rescol;
rescol = this.c1Schedule1.DataStorage.ResourceStorage.Resources;
C1.C1Schedule.Resource roomres = new C1.C1Schedule.Resource();
roomres.Text = "Digital Projector";
// Insert the resource into the Master Resource List.         
rescol.Insert(0, roomres);
// Assign the resource to the appointment.         
app.Resources.Add(roomres);

To create or remove resources at run time:

  1. Open the Resources dialog box.

  2. Select Master Resource List.

  3. Add or remove the required resources.

  4. Select OK.

C1WinForms Scheduler master resources dialog box options

After creating resources, assign them to the appointment in the Resources dialog box.