Enhanced Last Processed Data
IDescription.GetDescriptions with body Nuget bump Removed ~ logic
This commit is contained in:
@ -13,15 +13,18 @@ public class TXT
|
||||
private int _I;
|
||||
private readonly string _Data;
|
||||
|
||||
public TXT(string receivedData)
|
||||
public TXT(LastProcessData lastProcessData, string receivedData)
|
||||
{
|
||||
_I = 0;
|
||||
Site site;
|
||||
bool usedLast;
|
||||
_Data = receivedData;
|
||||
List<Site> sites = new();
|
||||
const string twoSpaces = " ";
|
||||
string title = GetBefore("Recipe:");
|
||||
string recipe = GetToken();
|
||||
string dateTime = GetToEOL();
|
||||
string recipeAndDateTime = GetToEOL();
|
||||
string recipe = !recipeAndDateTime.Contains(twoSpaces) ? recipeAndDateTime.Substring(0, 25).Trim() : recipeAndDateTime.Split(new string[] { twoSpaces }, StringSplitOptions.None)[0].Trim();
|
||||
string dateTime = recipeAndDateTime.Substring(recipe.Length).Trim();
|
||||
if (dateTime.EndsWith("."))
|
||||
dateTime = dateTime.Remove(dateTime.Length - 1, 1);
|
||||
ScanPast("operator:");
|
||||
@ -42,6 +45,17 @@ public class TXT
|
||||
_ = GetToEOL();
|
||||
if (string.IsNullOrEmpty(wafer))
|
||||
throw new Exception("Wafer field is missing.");
|
||||
if (!string.IsNullOrEmpty(title))
|
||||
usedLast = false;
|
||||
else
|
||||
{
|
||||
title = lastProcessData.Title;
|
||||
recipe = lastProcessData.Recipe;
|
||||
@operator = lastProcessData.Operator;
|
||||
batch = lastProcessData.Batch;
|
||||
cassette = lastProcessData.Cassette;
|
||||
usedLast = true;
|
||||
}
|
||||
string token = GetToken();
|
||||
while (true)
|
||||
{
|
||||
@ -75,6 +89,7 @@ public class TXT
|
||||
Operator = @operator,
|
||||
Batch = batch,
|
||||
Cassette = cassette,
|
||||
UsedLast = usedLast,
|
||||
Wafer = wafer,
|
||||
};
|
||||
Body = new()
|
||||
@ -90,6 +105,11 @@ public class TXT
|
||||
RadialVariationThickness = radialVariationThickness,
|
||||
Slot = slot,
|
||||
};
|
||||
lastProcessData.Title = title;
|
||||
lastProcessData.Recipe = recipe;
|
||||
lastProcessData.Operator = @operator;
|
||||
lastProcessData.Batch = batch;
|
||||
lastProcessData.Cassette = cassette;
|
||||
}
|
||||
|
||||
private string GetBefore(string text)
|
||||
|
Reference in New Issue
Block a user