[feat] 加入广播端口状态消息

详细描述

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
xu 2024-06-28 18:30:13 +08:00
parent fdfe4ccb56
commit 496458f00e

View File

@ -9,6 +9,8 @@ namespace Plane.Windows.Messages
{
private static Action<string> ShowAction { get; set; }
private static Action<bool> ConnectAction { get; set; }
private static Action<bool> BoardportAction { get; set; }
private static Action<string> StatusAction { get; set; }
public static void Configure(Action<string> showAction)
@ -41,5 +43,18 @@ namespace Plane.Windows.Messages
{
ConnectAction?.Invoke(isConnected);
}
public static void Configureboard(Action<bool> boardportAction)
{
BoardportAction = boardportAction;
}
public static void BoardOpen(bool isOpened)
{
BoardportAction?.Invoke(isOpened);
}
}
}