|  | @@ -43,11 +43,283 @@ namespace MeasureThread
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          private DateTime m_time;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        public int Step_Code
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            get { return step_Code; }
 | 
	
		
			
				|  |  | +            set { step_Code = value; }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        private int step_Code;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //图片信息
 | 
	
		
			
				|  |  | +        public class PictureInformation
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            public Boolean Is_Picture
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                get { return is_Picture; }
 | 
	
		
			
				|  |  | +                set { is_Picture = value; }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            private Boolean is_Picture;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            public String Picture_FullPath
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                get { return picture_FullPath; }
 | 
	
		
			
				|  |  | +                set { picture_FullPath = value; }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            private String picture_FullPath;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            public double Work_Voltage
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                get { return work_Voltage; }
 | 
	
		
			
				|  |  | +                set { work_Voltage = value; }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            private double work_Voltage;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            public double Magnification
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                get { return magnification; }
 | 
	
		
			
				|  |  | +                set { magnification = value; }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            private double magnification;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            public double Work_Distance
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                get { return work_Distance; }
 | 
	
		
			
				|  |  | +                set { work_Distance = value; }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            private double work_Distance;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            public String Work_Status
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                get { return work_Status; }
 | 
	
		
			
				|  |  | +                set { work_Status = value; }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            private String work_Status;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        //图片信息实例类
 | 
	
		
			
				|  |  | +        public PictureInformation Picture_Information
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            get { return picture_Information; }
 | 
	
		
			
				|  |  | +            set { picture_Information = value; }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        private PictureInformation picture_Information;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //图像信息
 | 
	
		
			
				|  |  | +        public class ImageInformation
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            public int Method_Name
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                get { return method_Name; }
 | 
	
		
			
				|  |  | +                set { method_Name = value; }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            private int method_Name;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            public Source_Img_Degree_Direction SIDD;
 | 
	
		
			
				|  |  | +            public Cut_Position CP;
 | 
	
		
			
				|  |  | +            public Cut_Success CS;
 | 
	
		
			
				|  |  | +            public Trapezoid_Top_Center_Position TTCP;
 | 
	
		
			
				|  |  | +            public Auto_Foucs AF;
 | 
	
		
			
				|  |  | +            public Auto_Stigmatic AS;
 | 
	
		
			
				|  |  | +            public Center_Position_OffsetAngle_Direction CPOD;
 | 
	
		
			
				|  |  | +            public Measure_Size MS;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            public ImageInformation()
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                SIDD = new Source_Img_Degree_Direction();
 | 
	
		
			
				|  |  | +                CP = new Cut_Position();
 | 
	
		
			
				|  |  | +                CS = new Cut_Success();
 | 
	
		
			
				|  |  | +                TTCP = new Trapezoid_Top_Center_Position();
 | 
	
		
			
				|  |  | +                AF = new Auto_Foucs();
 | 
	
		
			
				|  |  | +                AS = new Auto_Stigmatic();
 | 
	
		
			
				|  |  | +                CPOD = new Center_Position_OffsetAngle_Direction();
 | 
	
		
			
				|  |  | +                MS = new Measure_Size();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //1-计算原始图像偏移角度及方向
 | 
	
		
			
				|  |  | +            public class Source_Img_Degree_Direction
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                public Boolean Is_Image = false;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public double Degree
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return degree; }
 | 
	
		
			
				|  |  | +                    set { degree = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private double degree;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public int Direction
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return direction; }
 | 
	
		
			
				|  |  | +                    set { direction = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private int direction;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public int State
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return state; }
 | 
	
		
			
				|  |  | +                    set { state = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private int state;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //2-计算切割点位置
 | 
	
		
			
				|  |  | +            public class Cut_Position
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                public Boolean Is_Image = false;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public double Offsetx
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return offsetx; }
 | 
	
		
			
				|  |  | +                    set { offsetx = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private double offsetx;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public double Offsety
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return offsety; }
 | 
	
		
			
				|  |  | +                    set { offsety = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private double offsety;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public int State
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return state; }
 | 
	
		
			
				|  |  | +                    set { state = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private int state;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //3-是否切割成功
 | 
	
		
			
				|  |  | +            public class Cut_Success
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                public Boolean Is_Image = false;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public int State
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return state; }
 | 
	
		
			
				|  |  | +                    set { state = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private int state;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //4-计算切割后图像梯形区域上边中心点坐标
 | 
	
		
			
				|  |  | +            public class Trapezoid_Top_Center_Position
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                public Boolean Is_Image = false;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public double TopCenterX
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return topCenterX; }
 | 
	
		
			
				|  |  | +                    set { topCenterX = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private double topCenterX;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public double TopCenterY
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return topCenterY; }
 | 
	
		
			
				|  |  | +                    set { topCenterY = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private double topCenterY;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public int State
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return state; }
 | 
	
		
			
				|  |  | +                    set { state = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private int state;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //5-自动对焦
 | 
	
		
			
				|  |  | +            public class Auto_Foucs
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                public Boolean Is_Image = true;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public String Img_Path
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return img_Path; }
 | 
	
		
			
				|  |  | +                    set { img_Path = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private String img_Path;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //6-自动像闪
 | 
	
		
			
				|  |  | +            public class Auto_Stigmatic
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                public Boolean Is_Image = true;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public String Img_Path
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return img_Path; }
 | 
	
		
			
				|  |  | +                    set { img_Path = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private String img_Path;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //7-计算切割面区域中心坐标,以及偏移角度及方向
 | 
	
		
			
				|  |  | +            public class Center_Position_OffsetAngle_Direction
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                public Boolean Is_Image = false; 
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public double CenterX
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return centerX; }
 | 
	
		
			
				|  |  | +                    set { centerX = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private double centerX;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public double CenterY
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return centerY; }
 | 
	
		
			
				|  |  | +                    set { centerY = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private double centerY;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public double Degree
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return degree; }
 | 
	
		
			
				|  |  | +                    set { degree = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private double degree;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public int Direction
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return direction; }
 | 
	
		
			
				|  |  | +                    set { direction = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private int direction;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public int State
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return state; }
 | 
	
		
			
				|  |  | +                    set { state = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private int state;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //8-测量尺寸
 | 
	
		
			
				|  |  | +            public class Measure_Size
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                public Boolean Is_Image = false;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                public int State
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    get { return state; }
 | 
	
		
			
				|  |  | +                    set { state = value; }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                private int state;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          public ThreadStatusEventArgs(string a_State)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |              this.m_state = a_State;
 | 
	
		
			
				|  |  | +            picture_Information = new PictureInformation();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      public class CutHolesStatusEventArgs
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  |          public string State
 |