| 12345678910111213141516171819202122232425262728 |
- using System;
- using TeamAAS.Robot.Enums;
- namespace TeamAAS.Robot.Attributes
- {
- [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
- public sealed class RobotAttribute : Attribute
- {
- public string DisplayName { get; }
- public RobotBrand Brand { get; }
- public string Description { get; }
- /// <summary>
- /// 品牌专属调试页类型(必须是 <c>System.Windows.FrameworkElement</c> 的子类,且建议实现
- /// <c>TeamAAS.Robot.UI.IRobotDebugPage</c> 以接收机器人实例)。
- /// 为 null(默认)时,宿主使用通用的手动调试面板。
- /// 用法:[Robot("EPSON", RobotBrand.EPSON, DebugPageType = typeof(EpsonDebugPage))]
- /// </summary>
- public Type DebugPageType { get; set; }
- public RobotAttribute(string displayName, RobotBrand brand, string description = "")
- {
- DisplayName = displayName;
- Brand = brand;
- Description = description;
- }
- }
- }
|