DEP08SIASM - Testing EDA
This commit is contained in:
@ -9,6 +9,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Adaptation.FileHandlers.jpeg;
|
||||
|
||||
@ -23,6 +24,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
protected long _LastChange;
|
||||
protected string _LastText;
|
||||
protected string _TessDataDirectory;
|
||||
protected List<int> _PreviousTotalDeltaCollection;
|
||||
protected readonly Dictionary<string, string> _Reactors;
|
||||
protected readonly List<(string, Color[])> _ColorCollections;
|
||||
|
||||
@ -80,6 +82,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
_StartY = int.Parse(startY);
|
||||
_EndX = int.Parse(endX);
|
||||
_EndY = int.Parse(endY);
|
||||
_PreviousTotalDeltaCollection = new();
|
||||
string masterImageDirectory = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Memory.Master.Images");
|
||||
_ColorCollections = ProcessData.GetColorCollections(_StartX, _StartY, _EndX, _EndY, masterImageDirectory);
|
||||
}
|
||||
@ -160,22 +163,19 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
results.Item4.Add(new FileInfo(reportFullPath));
|
||||
else
|
||||
{
|
||||
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _TessDataDirectory, _StartX, _StartY, _EndX, _EndY, _ColorCollections);
|
||||
if (iProcessData is ProcessData _)
|
||||
{
|
||||
if (!iProcessData.Details.Any())
|
||||
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
|
||||
if (iProcessData.Details[0] is not string mid || string.IsNullOrEmpty(mid))
|
||||
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
|
||||
_Logistics.MID = mid;
|
||||
SetFileParameterLotID(mid);
|
||||
_Logistics.ProcessJobID = iProcessData.GetCurrentReactor(this, _Logistics, _Reactors);
|
||||
}
|
||||
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _StartX, _StartY, _EndX, _EndY, _ColorCollections, _PreviousTotalDeltaCollection, _LastText);
|
||||
if (iProcessData is not ProcessData processData)
|
||||
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
|
||||
string mid = processData.Text;
|
||||
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
_Logistics.MID = mid;
|
||||
SetFileParameterLotID(mid);
|
||||
_Logistics.ProcessJobID = iProcessData.GetCurrentReactor(this, _Logistics, _Reactors);
|
||||
if (!iProcessData.Details.Any())
|
||||
throw new Exception(string.Concat("C) No Data - ", dateTime.Ticks));
|
||||
if (_LastText != _Logistics.MID || _LastChange < DateTime.Now.AddMinutes(-30).Ticks)
|
||||
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
|
||||
if (_LastText != processData.Text || _LastChange < DateTime.Now.AddMinutes(-30).Ticks)
|
||||
{
|
||||
_LastText = _Logistics.MID;
|
||||
_LastText = processData.Text;
|
||||
_LastChange = DateTime.Now.Ticks;
|
||||
results = iProcessData.GetResults(this, _Logistics, results.Item4);
|
||||
}
|
||||
|
Reference in New Issue
Block a user