f390bcd133
- 提示音:winmm 从内存异步播放打包 wav,可在设置开关,带防连环音 - 调用方图标:进程树上溯识别编辑器/终端,ExtractIconEx + GDI 转 Avalonia 位图显示 - 进程树跳过 shell/运行时,取不到图标回退默认 Claude 图标 - 消息清洗:折叠换行/多余空白为单行,避免撑乱 toast 布局 - 全程 LibraryImport/源生成,AOT 友好
37 lines
1023 B
C#
37 lines
1023 B
C#
namespace Notify.Models;
|
|
|
|
/// <summary>
|
|
/// 一次弹窗请求(后续由 hook / named pipe 投递)
|
|
/// </summary>
|
|
public sealed class ToastRequest
|
|
{
|
|
public required string Title { get; init; }
|
|
|
|
public required string Message { get; init; }
|
|
|
|
/// <summary>
|
|
/// true = 需要输入(黄色边框),false = 任务完成(橙色边框)
|
|
/// </summary>
|
|
public bool InputMode { get; init; }
|
|
|
|
/// <summary>
|
|
/// true = 常驻:不自动消失,只能点击 / ✕ 关闭
|
|
/// </summary>
|
|
public bool Sticky { get; init; }
|
|
|
|
/// <summary>
|
|
/// 点击 toast 主体时要激活的窗口句柄,0 表示不激活
|
|
/// </summary>
|
|
public long TargetHwnd { get; init; }
|
|
|
|
/// <summary>
|
|
/// 目标若为 Windows Terminal,激活后要切回的标签 RuntimeId
|
|
/// </summary>
|
|
public string? WtRuntimeId { get; init; }
|
|
|
|
/// <summary>
|
|
/// 调用方 App 的 exe 路径,用于显示其图标
|
|
/// </summary>
|
|
public string? IconPath { get; init; }
|
|
}
|