ILessonsService 接口
- 程序集
- ClassIsland.Core.dll
课程服务,用于存储当前课表状态与信息。
public interface ILessonsService : INotifyPropertyChanged, INotifyPropertyChanging, IPublicLessonsService
- 继承成员
方法
GetClassPlanByDate(DateTime, out Guid?)
根据日期获取当天的课表ClassPlan。如果那天没有课表安排,则返回 null
ClassPlan? GetClassPlanByDate(DateTime date, out Guid? guid)
参数
返回
- ClassPlan
获取到的课表
GetCyclePositionsByDate(DateTime?)
计算指定日期所在周在多周轮换(2周 ~ 最大周期)中的位置。
ObservableCollection<int> GetCyclePositionsByDate(DateTime? referenceTime = null)
参数
referenceTimeDateTime?指定日期。默认为当前日期。
返回
备注
2-first, 1-based
StartMainTimer()
启动主计时器。
void StartMainTimer()
StopMainTimer()
停止主计时器。
void StopMainTimer()
事件
CurrentTimeStateChanged
当当前时间状态改变时触发。
event EventHandler? CurrentTimeStateChanged
事件类型
OnAfterSchool
当放学时触发。
event EventHandler? OnAfterSchool
事件类型
OnBreakingTime
当课间休息时触发。
event EventHandler? OnBreakingTime
事件类型
OnClass
当上课时触发。
event EventHandler? OnClass
事件类型
PostMainTimerTicked
在主计时器完成处理课表信息后触发。
event EventHandler? PostMainTimerTicked
事件类型
PreMainTimerTicked
在主计时器开始处理课表信息前触发。
event EventHandler? PreMainTimerTicked