using OTSMeasureApp._4_OTSSamplespaceGraphicsPanel.VisualGDIObjects; 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 { CDisplayGDIObject m_SampleHoleGDIObject;// CMeasureArea m_MeasureGDIObject;//path public float GetZoomNum() { return m_SampleHoleGDIObject.GetZoomNumber(); } public PointF GetDisplayRefPoint() { return m_SampleHoleGDIObject.GetDisplayRefPoint(); } public CVisualSampleArea() { m_SampleHoleGDIObject = new CDisplayGDIObject(); //测量区域 m_MeasureGDIObject = new CMeasureArea(); } public CDisplayGDIObject GetSampleGDIObject() { return m_SampleHoleGDIObject; } public void SetSampleGDIObject(CDisplayGDIObject value) { m_SampleHoleGDIObject = value; } public CMeasureArea GetMeasureGDIObject() { return m_MeasureGDIObject; } public void SetMeasureGDIObject(CMeasureArea value) { m_MeasureGDIObject = value; } public string GetSampleName() { return m_SampleHoleGDIObject.SampleName; } public void SetSampleName(string value) { m_SampleHoleGDIObject.SampleName = value; } public bool IsWorkSample() { return m_SampleHoleGDIObject.IsWorkSample; } public void SetIsWorkSample(bool value) { m_SampleHoleGDIObject.IsWorkSample = value; } public List GetMeasureFieldGDIObjects() { return m_MeasureGDIObject.SubItems(); } public void SetMeasureFieldGDIObjects(List value) { m_MeasureGDIObject.ClearSubItems(); foreach (var gdi in value) { m_MeasureGDIObject.AddSubItems(gdi); } } public void AddFieldGDIObject( CVisualFieldGDIObject gdi) { gdi.SetZoomNumber(m_MeasureGDIObject.GetZoomNumber()); gdi.SetDisplayRefPoint(m_MeasureGDIObject.GetDisplayRefPoint()); m_MeasureGDIObject.AddSubItems(gdi); } } }