| | |
| | | using Bro.Common.Helper; |
| | | using Bro.Common.Interface; |
| | | using Bro.Common.Model; |
| | | using HalconDotNet; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | using System.Drawing.Design; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Bro.M071.Process |
| | |
| | | |
| | | public class ProductionMeasurement : INotifyPropertyChanged, IDisposable |
| | | { |
| | | public string Barcode { get; set; } |
| | | public string Barcode; |
| | | |
| | | public List<MeasurementUint> Measurements { get; set; } = new List<MeasurementUint>(); |
| | | public List<MeasurementUint> Measurements = new List<MeasurementUint>(); |
| | | |
| | | public List<IShapeElement> ElementList = new List<IShapeElement>(); |
| | | |
| | | public event PropertyChangedEventHandler PropertyChanged; |
| | | |
| | | public void Dispose() |
| | | { |
| | | Barcode = null; |
| | | |
| | | Measurements?.ForEach(m => m?.Dispose()); |
| | | Measurements = null; |
| | | |
| | | Barcode = null; |
| | | GC.Collect(); |
| | | } |
| | | |
| | |
| | | [TypeConverter(typeof(KeyUnitResultConverter))] |
| | | public string KeyResult { get; set; } = ""; |
| | | |
| | | |
| | | public List<HImage> KeyImages = new List<HImage>(); |
| | | |
| | | public volatile int ImageSaveStatus = 0; |
| | | //[Browsable(false)] |
| | | //public NoticedDictionary<string, double?> MeasureValueDict { get; set; } = new NoticedDictionary<string, double?>(); |
| | | |
| | |
| | | |
| | | public void Dispose() |
| | | { |
| | | SpinWait wait = new SpinWait(); |
| | | while (ImageSaveStatus != 0) |
| | | { |
| | | wait.SpinOnce(); |
| | | } |
| | | |
| | | KeyImages?.ForEach(i => |
| | | { |
| | | i?.Dispose(); |
| | | i = null; |
| | | }); |
| | | KeyImages = null; |
| | | MeasureValueDict = null; |
| | | } |
| | | |