| 123456789101112131415161718192021222324252627 |
- using System;
- namespace TeamAAS.Camera.Attributes
- {
- [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
- public sealed class CameraAttribute : Attribute
- {
- public string DisplayName { get; }
- public string Brand { get; }
- public string Description { get; }
- /// <summary>
- /// 品牌专属调试页类型(必须是 <c>System.Windows.FrameworkElement</c> 的子类,且建议实现
- /// <c>TeamAAS.Camera.UI.ICameraDebugPage</c> 以接收相机实例)。
- /// 为 null(默认)时,宿主使用类库内置的通用调试页。
- /// 用法:[Camera("康耐视 VisionPro", "康耐视 VisionPro", DebugPageType = typeof(CognexDebugPage))]
- /// </summary>
- public Type DebugPageType { get; set; }
- public CameraAttribute(string displayName, string brand, string description = "")
- {
- DisplayName = displayName;
- Brand = brand;
- Description = description;
- }
- }
- }
|