| | |
| | | [TypeConverter(typeof(KeyNameDictConverter))] |
| | | public string Key { get; set; } |
| | | |
| | | [Category("默认配置")] |
| | | [Description("是否默认尺寸配置")] |
| | | public bool IsDefault { get; set; } = false; |
| | | |
| | | //[Category("位置配置")] |
| | | //[Description("单键在键盘平面图上的位置显示")] |
| | | //public RectangleF KeyRect { get; set; } = new RectangleF(0, 0, 0, 0); |
| | | |
| | | [Category("位置配置")] |
| | | [Description("单键在键盘平面图上的位置显示")] |
| | | public Rectangle KeyRect { get; set; } = new Rectangle(); |
| | | [Description("单键左上角坐标")] |
| | | [TypeConverter(typeof(ComplexObjectConvert))] |
| | | [Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))] |
| | | public CustomizedPoint KeyPosition { get; set; } = new CustomizedPoint(); |
| | | |
| | | [Category("位置配置")] |
| | | [Description("单键尺寸")] |
| | | public SizeF KeySize { get; set; } = new SizeF(); |
| | | |
| | | [Category("位置配置")] |
| | | [Description("单键之后间隙位置")] |
| | | public Rectangle IntervalRect { get; set; } = new Rectangle(); |
| | | public SizeF IntervalSize { get; set; } = new SizeF(); |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | | return $"{Key}:{KeyRect.X},{KeyRect.Y},{KeyRect.Width},{KeyRect.Height}"; |
| | | return $"{(IsDefault ? "Default" : Key)}:{KeyPosition.X},{KeyPosition.Y},{KeySize.Width},{KeySize.Height}"; |
| | | } |
| | | } |
| | | |
| | | |
| | | public class KeyAlgorithem : IComplexDisplay |
| | | { |
| | |
| | | [Description("检测算法路径")] |
| | | [Editor(typeof(FileDialogEditor), typeof(UITypeEditor))] |
| | | public string AlgorithemPath { get; set; } |
| | | |
| | | [Category("上传NG代码")] |
| | | [Description("上传NG代码")] |
| | | public string NGCode { get; set; } |
| | | |
| | | [Category("显示配置")] |
| | | [Description("显示区域大小")] |
| | | [DisplayName("标签大小")] |
| | | public Size DisplayRect { get; set; } |
| | | } |
| | | |
| | | public class KeyResult : IComplexDisplay |
| | |
| | | |
| | | mUnit.Id = this.Id; |
| | | mUnit.Name = this.Name; |
| | | if (string.IsNullOrWhiteSpace(mUnit.Name)) |
| | | { |
| | | mUnit.Name = string.Join("-", KeyUnitCollection.Select(u => u.GetDisplayText())); |
| | | } |
| | | |
| | | mUnit.IsEnabled = this.IsEnabled; |
| | | mUnit.MeasureType = this.MeasureType; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public class KeyCodeMap : IComplexDisplay |
| | | { |
| | | [Category("键名映射配置")] |
| | | [Description("键名")] |
| | | [TypeConverter(typeof(KeyNameDictConverter))] |
| | | public string Key { get; set; } |
| | | |
| | | [Category("键名映射配置")] |
| | | [Description("上传对应键代码Code")] |
| | | public string KeyCode { get; set; } |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | | return $"{Key}--{KeyCode}"; |
| | | } |
| | | } |
| | | |
| | | //public class NoticedDictionary<T1, T2> : Dictionary<T1, T2>, INotifyPropertyChanged |
| | | //{ |
| | | // public event PropertyChangedEventHandler PropertyChanged; |