namespace Notify.Models;
///
/// 屏幕角落,决定 toast 堆叠的起点与方向
///
public enum ToastCorner
{
TopLeft,
TopRight,
BottomLeft,
BottomRight,
}
///
/// 持久化的弹窗设置(纯数据模型,序列化到磁盘)
///
public sealed class ToastSettings
{
///
/// 自动消失前的停留秒数
///
public int DurationSeconds { get; set; } = 4;
///
/// 出现的屏幕角落
///
public ToastCorner Corner { get; set; } = ToastCorner.BottomRight;
///
/// 不透明度 0–1
///
public double Opacity { get; set; } = 0.96;
///
/// 最多同时可见的 toast 数量,超出则排队
///
public int MaxVisible { get; set; } = 5;
///
/// 是否播放提示音
///
public bool PlaySound { get; set; } = true;
///
/// toast 宽度(DIP)
///
public double Width { get; set; } = 340;
///
/// 淡入/淡出时长(毫秒)
///
public int FadeMilliseconds { get; set; } = 300;
///
/// 跨所有虚拟桌面显示(未公开 API,失败自动退回单桌面)
///
public bool ShowOnAllDesktops { get; set; } = true;
public ToastSettings Clone() => (ToastSettings)MemberwiseClone();
}