Files
ACP/UIShare/PubEvent/SubProgramNavigateEvent.cs
2026-08-07 14:54:01 +08:00

38 lines
1.1 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Prism.Events;
using UIShare.UIViewModel;
namespace UIShare.PubEvent
{
/// <summary>
/// 子程序导航事件:运行时进入/退出子程序时发布,
/// StepsManagerViewModel 订阅后自动切换显示。
/// </summary>
public class SubProgramNavigateEvent : PubSubEvent<SubProgramNavigatePayload>
{
}
public class SubProgramNavigatePayload
{
/// <summary>目标台架的作用域标识</summary>
public string Scope { get; set; } = "";
/// <summary>Enter = 进入子程序,Exit = 退出回到上一级</summary>
public NavigateAction Action { get; set; }
/// <summary>进入时:子程序的 ProgramVM;退出时可为 null</summary>
public ProgramVM? SubProgram { get; set; }
/// <summary>子程序步骤的名称(用于面包屑显示)</summary>
public string? StepName { get; set; }
/// <summary>是否为错误程序 Tab 的导航(默认 false = 主程序 Tab</summary>
public bool IsErrorProgram { get; set; }
}
public enum NavigateAction
{
Enter,
Exit
}
}