Scheduler for WinForms supports resources created in code or at run time through the Master Resource List dialog box. The following code, added to the Form_Load event, creates a Digital Projector resource:
C# |
Copy Code
|
---|---|
// 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); |
At run time, creating a resource or resources can be done through the Master Resource List dialog box. Clicking the Master Resource List button in the Resources dialog box opens the Master Resource List dialog box where you add or remove resources.
After you create a resource or resources, add the resource to the appointment in the Resources dialog box. For more details how to add a resource to an appointment, see Assigning Resources to an Appointment.