using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel { public class CVisualSampleArea { private bool isSelect; CRectangleGDIObject m_SampleGDIObject;// CRectangleGDIObject m_MeasureGDIObject;//path private List polygonPathPoints; private bool isPolygon; public CVisualSampleArea() { m_SampleGDIObject = new CRectangleGDIObject(); //测量区域 m_MeasureGDIObject = new CRectangleGDIObject(); } public CRectangleGDIObject SampleGDIObject { get => m_SampleGDIObject; set => m_SampleGDIObject = value; } public CRectangleGDIObject MeasureGDIObject { get => m_MeasureGDIObject; set => m_MeasureGDIObject = value; } public string GetSampleName() { return m_SampleGDIObject.SampleName; } public void SetSampleName(string value) { m_SampleGDIObject.SampleName = value; } public List PolygonPathPoints { get => polygonPathPoints; set => polygonPathPoints = value; } public bool IsWorkSample() { return m_SampleGDIObject.IsWorkSample; } public void SetIsWorkSample(bool value) { m_SampleGDIObject.IsWorkSample = value; } public List GetMeasureFieldGDIObjects() { return m_MeasureGDIObject.SubItems(); } public void SetMeasureFieldGDIObjects(List value) { m_MeasureGDIObject.SubItems().Clear(); foreach (var gdi in value) { m_MeasureGDIObject.SubItems().Add(gdi); } } public bool IsPolygon { get => isPolygon; set => isPolygon = value; } public bool IsSelect { get => isSelect; set => isSelect = value; } public void AddFieldGDIObject(CRectangleGDIObject gdi) { gdi.SetZoomNumber(m_MeasureGDIObject.GetZoomNumber()); gdi.SetDisplayRefPoint(m_MeasureGDIObject.GetDisplayRefPoint()); m_MeasureGDIObject.SubItems().Add(gdi); } } }