12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- 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<Point> 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<Point> PolygonPathPoints { get => polygonPathPoints; set => polygonPathPoints = value; }
- public bool IsWorkSample()
- {
- return m_SampleGDIObject.IsWorkSample;
- }
- public void SetIsWorkSample(bool value)
- {
- m_SampleGDIObject.IsWorkSample = value;
- }
- public List<CRectangleGDIObject> GetMeasureFieldGDIObjects()
- {
- return m_MeasureGDIObject.SubItems();
- }
- public void SetMeasureFieldGDIObjects(List<CRectangleGDIObject> 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);
- }
-
- }
- }
|