IRobotDebugPage.cs 913 B

12345678910111213141516171819
  1. using TeamAAS.Robot.Interfaces;
  2. namespace TeamAAS.Robot.UI
  3. {
  4. /// <summary>
  5. /// 机器人调试页约定:宿主(设置页的机器人管理)选中机器人后,把运行中的机器人实例绑定给页面。
  6. /// 想为某个品牌定制专属调试页,让页面(FrameworkElement 子类)实现此接口,
  7. /// 并在该品牌的 [Robot] 特性上通过 <see cref="Attributes.RobotAttribute.DebugPageType"/> 指定即可。
  8. /// 未指定时宿主使用通用的手动调试面板。
  9. /// </summary>
  10. public interface IRobotDebugPage
  11. {
  12. /// <summary>绑定机器人实例(选中该机器人/页面被装载时调用)。</summary>
  13. void BindRobot(IRobot robot);
  14. /// <summary>解绑机器人实例(切换机器人/页面被卸载时调用,页面应停止使用机器人并清理界面状态)。</summary>
  15. void UnbindRobot();
  16. }
  17. }