Added ClosestMatchFileName,

Changed dummy to match HgCV
This commit is contained in:
2022-03-15 13:37:00 -07:00
parent 7a94484d0e
commit 360d2ee4d8
4 changed files with 28 additions and 39 deletions

View File

@ -33,6 +33,7 @@ public class Description : IDescription, Shared.Properties.IDescription
public int Red { get; set; }
public int Green { get; set; }
public int TotalDelta { get; set; }
public string ClosestMatchFileName { get; set; }
string IDescription.GetEventDescription() => "File Has been read and parsed";
@ -82,6 +83,7 @@ public class Description : IDescription, Shared.Properties.IDescription
nameof(Red),
nameof(Green),
nameof(TotalDelta),
nameof(ClosestMatchFileName),
};
return results;
}
@ -169,11 +171,12 @@ public class Description : IDescription, Shared.Properties.IDescription
Lot = processData.Text,
PSN = string.Empty,
Reactor = logistics.ProcessJobID,
Recipe = processData.Recipe,
Recipe = string.Empty,
//
Red = processData.Red,
Green = processData.Green,
TotalDelta = processData.TotalDelta,
ClosestMatchFileName = processData.ClosestMatchFileName,
};
results.Add(description);
}
@ -214,6 +217,7 @@ public class Description : IDescription, Shared.Properties.IDescription
Red = -1,
Green = -1,
TotalDelta = -1,
ClosestMatchFileName = nameof(ClosestMatchFileName),
};
return result;
}

View File

@ -16,13 +16,12 @@ namespace Adaptation.FileHandlers.jpeg;
public class FileRead : Shared.FileRead, IFileRead
{
protected int _EndX;
protected int _EndY;
protected int _StartX;
protected int _StartY;
protected int[] _Bounds;
protected long _LastChange;
protected string _LastText;
protected readonly int _EndX;
protected readonly int _EndY;
protected readonly int _StartX;
protected readonly int _StartY;
protected string _TessDataDirectory;
protected List<int> _PreviousTotalDeltaCollection;
protected readonly Dictionary<string, string> _Reactors;

View File

@ -25,7 +25,7 @@ public class ProcessData : IProcessData
public int Green { get; set; }
public string Text { get; set; }
public int TotalDelta { get; set; }
public string Recipe { get; set; }
public string ClosestMatchFileName { get; set; }
List<object> Shared.Properties.IProcessData.Details => _Details;
@ -260,8 +260,8 @@ public class ProcessData : IProcessData
totalDeltaCollection.Add(new(file, totalDelta));
}
totalDeltaCollection = (from l in totalDeltaCollection orderby l.TotalDelta select l).ToList();
Recipe = Path.GetFileNameWithoutExtension(totalDeltaCollection[0].File);
string[] closestMatchFileNameSplit = Recipe.Split('-');
ClosestMatchFileName = Path.GetFileNameWithoutExtension(totalDeltaCollection[0].File);
string[] closestMatchFileNameSplit = ClosestMatchFileName.Split('-');
Text = closestMatchFileNameSplit.Last().TrimStart();
TotalDelta = totalDeltaCollection[0].TotalDelta;
string textFileName = Get(fileRead, ".txt", $"{TotalDelta} - {Text}");