handling of performs and indices the new way
This commit is contained in:
@ -1697,12 +1697,25 @@ namespace CobXmlSupport
|
|||||||
qualifieldhlp tmpQlh = new qualifieldhlp(zRow, lIs.Indexes);
|
qualifieldhlp tmpQlh = new qualifieldhlp(zRow, lIs.Indexes);
|
||||||
qldList.Add(tmpQlh);
|
qldList.Add(tmpQlh);
|
||||||
}
|
}
|
||||||
|
IndStatus indSt = new IndStatus();
|
||||||
foreach (qualifieldhlp tmpQfh in qldList)
|
foreach (qualifieldhlp tmpQfh in qldList)
|
||||||
{
|
|
||||||
if (tmpQfh.indexStrings != null)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//obs under development
|
||||||
|
indSt.handleStatus(tmpQfh.indexStrings);
|
||||||
|
for (int i = 0; i < indSt.Returns; i++)
|
||||||
|
{
|
||||||
|
fromToMoves.CodeShower.Text += "END-PERFORM" + "\r\n";
|
||||||
}
|
}
|
||||||
|
if (indSt.NewInds != null)
|
||||||
|
{
|
||||||
|
foreach (string indTxt in indSt.NewInds)
|
||||||
|
{
|
||||||
|
fromToMoves.CodeShower.Text += "PERFORM VARYING " + indTxt + " FROM 1 BY 1 UNTIL ??? " + "\r\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//obs under development
|
||||||
|
|
||||||
fromToMoves.CodeShower.Text += "MOVE " + tmpQfh.ToString();
|
fromToMoves.CodeShower.Text += "MOVE " + tmpQfh.ToString();
|
||||||
fromToMoves.CodeShower.Text += "TO " + tmpQfh.ToExpString();
|
fromToMoves.CodeShower.Text += "TO " + tmpQfh.ToExpString();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,20 +16,27 @@ namespace CobXmlSupport
|
|||||||
presentInds = new List<string>();
|
presentInds = new List<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Bearbetar status av förekommande indexvariabler i aktuell xml-struktur
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="new_Inds">innehåller en string array med aktuella index för den kommande variabeln</param>
|
||||||
public void handleStatus(string[] new_Inds)
|
public void handleStatus(string[] new_Inds)
|
||||||
{
|
{
|
||||||
|
returns = 0;
|
||||||
List<string> news = new List<string>();
|
List<string> news = new List<string>();
|
||||||
news.AddRange(new_Inds);
|
if(new_Inds!=null) news.AddRange(new_Inds);
|
||||||
foreach (string tmpStr in presentInds)
|
|
||||||
|
foreach (string tmpStr in presentInds.ToArray())
|
||||||
{
|
{
|
||||||
if (news.Contains(tmpStr)) {}
|
if (news.Contains(tmpStr)) {}
|
||||||
else {
|
else {
|
||||||
|
presentInds.Remove(tmpStr);
|
||||||
returns += 1;
|
returns += 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<string> addedStrs = new List<string>();
|
List<string> addedStrs = new List<string>();
|
||||||
|
if (new_Inds != null)
|
||||||
|
{
|
||||||
foreach (string tmpInStr in new_Inds)
|
foreach (string tmpInStr in new_Inds)
|
||||||
{
|
{
|
||||||
if (presentInds.Contains(tmpInStr)) { }
|
if (presentInds.Contains(tmpInStr)) { }
|
||||||
@ -39,13 +46,29 @@ namespace CobXmlSupport
|
|||||||
addedStrs.Add(tmpInStr);
|
addedStrs.Add(tmpInStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Utveckling pågår !
|
if (addedStrs.Count > 0)
|
||||||
|
{
|
||||||
|
newInds = addedStrs.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int Returns
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return returns;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string[] NewInds
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return newInds;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user