using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace irisMemory { public class IdentifyConfig { // =1时表示在工作,拍图; // =0时表示终端待机 private volatile bool flagWorking; // 是否在拍图,是否在工作标志位 private volatile bool flagFindingEye; // 是否正在找眼标志位 private volatile bool flagFoundEye; // 是否找到合格眼睛标志位,用于表示是否进入识别过程 private int countNoEyeLast; // 进入识别过程前,连续没找到眼的次数 private string identifyTaskId; // 一次识别过程的id private IdentifyConfig() { this.InitConfig(); } /** * 初始化识别过程控制参数 */ public void InitConfig() { this.FlagWorking = false; this.FlagFindingEye = false; this.FlagFoundEye = false; this.CountNoEyeLast = 0; this.IdentifyTaskId = ""; } private static readonly IdentifyConfig identifyConfig = new IdentifyConfig(); public static IdentifyConfig GetInstance { get => identifyConfig; } public bool FlagWorking { get => flagWorking; set => flagWorking = value; } public bool FlagFindingEye { get => flagFindingEye; set => flagFindingEye = value; } public bool FlagFoundEye { get => flagFoundEye; set => flagFoundEye = value; } public int CountNoEyeLast { get => countNoEyeLast; set => countNoEyeLast = value; } public string IdentifyTaskId { get => identifyTaskId; set => identifyTaskId = value; } } }