(Resending - text editor did not work for me...)
Hello Principher,
Regarding the ScheduleEventStateChanged event, the following example should be notified on recording start / finish / cancel. When the schedule is newly created, that may not be notified. That is by the specification of this feature at this moment. From SDK document: "The following state changes are not notified: State change from None to any other state when creating a scheduled recording event."
Hope this helps.
---
public class EventListener {
protected void OnScheduleEventStateChanged(object sender, ScheduleEventChangedEventArgs e)
{
int count = e.Changes.Length;
for (int i = 0; i < count; i++)
{
Console.WriteLine("ScheduleEvent Id=\"{0}\"", e.Changes[i].ScheduleEventId);
Console.WriteLine(" PreviousState: {0}", e.Changes[i].PreviousState.ToString());
Console.WriteLine(" NewState: {0}", e.Changes[i].NewState.ToString());
}
}
public static void Main(string[] args)
{
EventSchedule scheduler = new EventSchedule();
EventListener listener = new EventListener();
scheduler.ScheduleEventStateChanged += listener.OnScheduleEventStateChanged;
System.Threading.Thread.Sleep(600000); // 10 minutes
scheduler.ScheduleEventStateChanged -= listener.OnScheduleEventStateChanged;
}
}