ChaoXingAutoClass
【WinUI】基于 XFEstudio 的 XFEWinUIApplication 模板重建的 WinUI 3 课程工作台。二维码和账号密码登录、课程 GridView、章节、播放进度、学习笔记及日志均使用原生 WinUI 控件。网页播放器运行在独立后台进程中,界面不显示课程网站。
关注
0
Fork
0
Star
0
using ChaoXingAutoClass.Browser;
using ChaoXingAutoClass.Core;
namespace ChaoXingAutoClass.Interface.Services;
public interface ILearningService : IAsyncDisposable, XFEExtension.NetCore.WinUIHelper.Interface.Services.IGlobalService
{
AppSettings Settings { get; }
IReadOnlyList<CourseInfo> Courses { get; }
IReadOnlyList<ChapterInfo> Chapters { get; }
CourseInfo? CurrentCourse { get; }
LearningController? Controller { get; }
IReadOnlyList<CourseJobSnapshot> Jobs { get; }
int EffectiveConcurrency { get; }
event Action<CourseJobSnapshot>? JobChanged;
CourseJobSnapshot? GetJob(CourseInfo course);
Task QueueCoursesAsync(IReadOnlyList<CourseInfo> courses, CancellationToken token);
Task StartCourseAsync(CourseInfo course, int startIndex, int? chapterLimit, bool homeworkOnly, CancellationToken token, bool? includeHomework = null, IReadOnlySet<string>? homeworkIds = null);
Task RefreshCourseAsync(CourseInfo course, CancellationToken token);
Task PauseOrResumeAsync(CourseInfo course);
void Stop(CourseInfo course);
event Action<LearningNotice>? Notice;
Task InitializeAsync(CancellationToken token);
Task<IReadOnlyList<CourseInfo>> RefreshCoursesAsync(CancellationToken token);
Task<LoginQr> GetQrAsync(CancellationToken token);
Task<LoginPoll> PollQrAsync(LoginQr qr, CancellationToken token);
Task<string?> PasswordLoginAsync(string account, string password, CancellationToken token);
Task OpenCourseAsync(CourseInfo course, CancellationToken token);
Task StartAsync(int startIndex, int? chapterLimit, CancellationToken token);
Task PauseOrResumeAsync();
void Stop();
void SaveSettings();
Task<string> TestAgentAsync(CancellationToken token);
}
using ChaoXingAutoClass.Browser;
using ChaoXingAutoClass.Core;
namespace ChaoXingAutoClass.Interface.Services;
public interface ILearningService : IAsyncDisposable, XFEExtension.NetCore.WinUIHelper.Interface.Services.IGlobalService
{
AppSettings Settings { get; }
IReadOnlyList<CourseInfo> Courses { get; }
IReadOnlyList<ChapterInfo> Chapters { get; }
CourseInfo? CurrentCourse { get; }
LearningController? Controller { get; }
IReadOnlyList<CourseJobSnapshot> Jobs { get; }
int EffectiveConcurrency { get; }
event Action<CourseJobSnapshot>? JobChanged;
CourseJobSnapshot? GetJob(CourseInfo course);
Task QueueCoursesAsync(IReadOnlyList<CourseInfo> courses, CancellationToken token);
Task StartCourseAsync(CourseInfo course, int startIndex, int? chapterLimit, bool homeworkOnly, CancellationToken token, bool? includeHomework = null, IReadOnlySet<string>? homeworkIds = null);
Task RefreshCourseAsync(CourseInfo course, CancellationToken token);
Task PauseOrResumeAsync(CourseInfo course);
void Stop(CourseInfo course);
event Action<LearningNotice>? Notice;
Task InitializeAsync(CancellationToken token);
Task<IReadOnlyList<CourseInfo>> RefreshCoursesAsync(CancellationToken token);
Task<LoginQr> GetQrAsync(CancellationToken token);
Task<LoginPoll> PollQrAsync(LoginQr qr, CancellationToken token);
Task<string?> PasswordLoginAsync(string account, string password, CancellationToken token);
Task OpenCourseAsync(CourseInfo course, CancellationToken token);
Task StartAsync(int startIndex, int? chapterLimit, CancellationToken token);
Task PauseOrResumeAsync();
void Stop();
void SaveSettings();
Task<string> TestAgentAsync(CancellationToken token);
}