R53 and R55

This commit is contained in:
2022-09-29 18:20:21 -07:00
parent e68df9c672
commit c1d2b619ee
5 changed files with 319 additions and 17 deletions

View File

@ -22,6 +22,8 @@ public class FileRead : Shared.FileRead, IFileRead
protected readonly Size _Size;
protected readonly int _StartX;
protected readonly int _StartY;
protected readonly int _OffSetX;
protected readonly int _OffSetY;
protected string _TessDataDirectory;
protected List<int> _PreviousTotalDeltaCollection;
protected readonly Dictionary<string, string> _Reactors;
@ -77,8 +79,9 @@ public class FileRead : Shared.FileRead, IFileRead
_EndY = int.Parse(endY);
_ColorCollections = new();
_PreviousTotalDeltaCollection = new();
(_OffSetX, _OffSetY) = ProcessData.GetOffSet(_FileConnectorConfiguration.SourceDirectoryCloaking);
string masterImageDirectory = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Memory.Master.Images");
List<(string File, Size Size, Color[] Colors)> colorCollections = ProcessData.GetColorCollections(_StartX, _StartY, _EndX, _EndY, masterImageDirectory);
List<(string File, Size Size, Color[] Colors)> colorCollections = ProcessData.GetColorCollections(_StartX, _StartY, _EndX, _EndY, _OffSetX, _OffSetY, masterImageDirectory);
int[] distinctSizes = (from l in colorCollections select l.Size.Width * l.Size.Height).Distinct().ToArray();
if (distinctSizes.Length != 1)
throw new Exception($"All Master Images must be the same size{Environment.NewLine}{string.Join(Environment.NewLine, distinctSizes)}");
@ -160,7 +163,7 @@ public class FileRead : Shared.FileRead, IFileRead
results.Item4.Add(_Logistics.FileInfo);
else
{
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _StartX, _StartY, _EndX, _EndY, _Size, _ColorCollections);
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _StartX, _StartY, _EndX, _EndY, _OffSetX, _OffSetY, _Size, _ColorCollections);
if (iProcessData is not ProcessData processData)
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
string lastText = Regex.Replace(_LastText, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];