Solution on perform -> end-perform problem.

This commit is contained in:
2014-12-08 13:58:40 +01:00
parent 9b4f39834f
commit 1a78dcc16d
3 changed files with 66 additions and 5 deletions

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace CobXmlSupport
{
@ -9,7 +10,7 @@ namespace CobXmlSupport
{
private List<string> presentInds = null;
private int returns = 0;
private string[] newInds=null;
private string[] newInds = null;
public IndStatus()
{
@ -22,18 +23,40 @@ namespace CobXmlSupport
/// <param name="new_Inds">innehåller en string array med aktuella index för den kommande variabeln</param>
public void handleStatus(string[] new_Inds)
{
Debug.WriteLine("------- present indexs -------");
foreach (string prind in presentInds.ToArray())
{
Debug.Write(prind + ", ");
}
Debug.WriteLine("");
Debug.WriteLine("------- new indexs -------");
if (new_Inds != null)
{
foreach (string nind in new_Inds)
{
Debug.Write(nind + ", ");
}
Debug.WriteLine("");
}
else
Debug.WriteLine(" = null ");
returns = 0;
List<string> news = new List<string>();
if(new_Inds!=null) news.AddRange(new_Inds);
if (new_Inds != null) news.AddRange(new_Inds);
foreach (string tmpStr in presentInds.ToArray())
{
if (news.Contains(tmpStr)) {}
else {
if (news.Contains(tmpStr)) { }
else
{
presentInds.Remove(tmpStr);
returns += 1;
returns += 1;
}
}
List<string> addedStrs = new List<string>();
if (new_Inds != null)
{
@ -51,9 +74,28 @@ namespace CobXmlSupport
{
newInds = addedStrs.ToArray();
}
else newInds = null;
Debug.WriteLine("------- returns -------");
Debug.Write(returns);
Debug.WriteLine("");
Debug.WriteLine("------- tillagda Inds -------");
if (newInds != null)
{
foreach (string tlind in newInds)
{
Debug.Write(tlind + ", ");
}
Debug.WriteLine("");
}
else
Debug.WriteLine(" = null ");
}
public int Returns
{
get