54 lines
1.7 KiB
C#
54 lines
1.7 KiB
C#
using AudioWallpaper.ActivityWatch;
|
|
using AudioWallpaper.SSO;
|
|
using AudioWallpaper.Tools;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AudioWallpaper {
|
|
public class AccAssManage {
|
|
private SentenceHelper SentenceHelper;
|
|
|
|
public static AccAssManage? Instance = null;
|
|
|
|
public AccAssManage() {
|
|
SentenceHelper = new SentenceHelper();
|
|
|
|
SentenceHelper.SentenceChanged += SentenceHelper_SentenceChanged;
|
|
SentenceHelper.Start();
|
|
|
|
Instance = this;
|
|
}
|
|
|
|
public void UpdateLoginState(LoginMeta loginMeta) {
|
|
SentenceHelper.UpdateLoginState(loginMeta);
|
|
}
|
|
public void UpdateUseState(bool isUse) {
|
|
SentenceHelper.UpdateUseState(isUse);
|
|
}
|
|
public void SetInterval(int newInterval) {
|
|
SentenceHelper.SetInterval(newInterval);
|
|
}
|
|
public void Stop() {
|
|
SentenceHelper.Stop();
|
|
}
|
|
public void Dispose() {
|
|
SentenceHelper.SentenceChanged -= SentenceHelper_SentenceChanged;
|
|
SentenceHelper.Dispose();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 句子数据更改时执行
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
/// <exception cref="NotImplementedException"></exception>
|
|
private void SentenceHelper_SentenceChanged(object? sender, FocusStatusRecord fsr) {
|
|
Console.WriteLine("假设这是执行了事件的代码");
|
|
Console.WriteLine("这是从事件回调中获取到的数据:" + fsr.Message);
|
|
}
|
|
}
|
|
}
|