xtrascheduler change appointment label item code example
Example 1: xtrascheduler custom labels
scheduler.Storage.Appointments.Clear()
Dim IssueList() As String = {"Consultation", "Treatment", "X-Ray"}
Dim IssueColorList() As Color = {Color.Ivory, Color.Pink, Color.Plum}
Dim PaymentStatuses() As String = {"Paid", "Unpaid"}
Dim PaymentColorStatuses() As Color = {Color.Green, Color.Red}
Dim labelStorage As IAppointmentLabelStorage = scheduler.Storage.Appointments.Labels
labelStorage.Clear()
Dim count As Integer = IssueList.Length
For i As Integer = 0 To count - 1
Dim label As IAppointmentLabel = labelStorage.CreateNewLabel(i, IssueList(i))
label.SetColor(IssueColorList(i))
labelStorage.Add(label)
Next i
Dim statusColl As AppointmentStatusCollection = scheduler.Storage.Appointments.Statuses
statusColl.Clear()
count = PaymentStatuses.Length
For i As Integer = 0 To count - 1
Dim status As AppointmentStatus = statusColl.CreateNewStatus(i, PaymentStatuses(i), PaymentStatuses(i))
status.SetBrush(New SolidBrush(PaymentColorStatuses(i)))
statusColl.Add(status)
Next i
Example 2: schedulercontrol get labels
SchedulerDataStorage.Labels