Track whether action changes have been stored in long-term memory.
This commit is contained in:
parent
98ed29a45e
commit
44b26812ed
@ -30,9 +30,17 @@ namespace EduNetworkBuilder
|
||||
if (start == null) return;//Do nothing
|
||||
CurrentNetAction = new NetworkAction(start);
|
||||
}
|
||||
CurrentNetAction.HasBeenStored = false;// We have a change. That change has not been pushed
|
||||
CurrentNetAction.Add(What);
|
||||
}
|
||||
|
||||
public bool CurrentNeedsStoring
|
||||
{ get {
|
||||
if (CurrentNetAction == null) return false;
|
||||
return (CurrentNetAction.HasBeenStored == false);
|
||||
}
|
||||
}
|
||||
|
||||
public bool RunAction(int WhichIndex)
|
||||
{
|
||||
if (CurrentNetAction == null) return false;
|
||||
@ -58,6 +66,7 @@ namespace EduNetworkBuilder
|
||||
if (NA != null) NetActions.Remove(NA);
|
||||
}
|
||||
//Add this one
|
||||
CurrentNetAction.HasBeenStored = true; //Note that we have stored it
|
||||
NetActions.Add(CurrentNetAction);
|
||||
}
|
||||
|
||||
@ -99,6 +108,10 @@ namespace EduNetworkBuilder
|
||||
{
|
||||
public string NetworkName = "";
|
||||
public List<ActionClass> Actions = new List<ActionClass>();
|
||||
/// <summary>
|
||||
/// This tells us if it has been stored to the long-term action list.
|
||||
/// </summary>
|
||||
public bool HasBeenStored = false;
|
||||
public NetworkAction(string Name)
|
||||
{
|
||||
NetworkName = Name;
|
||||
|
Loading…
Reference in New Issue
Block a user