领胜LDS 键盘AOI检测项目
wells.liu
2020-07-16 81480d62561dcb75a1fc968814ace1368fe5181b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using Bro.Common.Helper;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Bro.Common.Model.Model
{
    public class CustomizedRectangle : IComplexDisplay
    {
        [Category("几何特性")]
        [Description("左上顶点X坐标")]
        public float X { get; set; }
 
        [Category("几何特性")]
        [Description("左上顶点Y坐标")]
        public float Y { get; set; }
 
        [Category("几何特性")]
        [Description("宽")]
        public float Width { get; set; }
 
        [Category("几何特性")]
        [Description("高")]
        public float Height { get; set; }
 
        public string GetDisplayText()
        {
            return $"({X},{Y})|{Width}:{Height}";
        }
 
        public RectangleF GetRectangle()
        {
            RectangleF rect = new RectangleF(X, Y, Width, Height);            
            return rect;
        }
    }
}