Track if the action collection needs to be saved.
This commit is contained in:
parent
44b26812ed
commit
f68e3138f4
@ -12,6 +12,11 @@ namespace EduNetworkBuilder
|
|||||||
Network StartingState = null;
|
Network StartingState = null;
|
||||||
public List<NetworkAction> NetActions = new List<NetworkAction>();
|
public List<NetworkAction> NetActions = new List<NetworkAction>();
|
||||||
NetworkAction CurrentNetAction = null;
|
NetworkAction CurrentNetAction = null;
|
||||||
|
bool _HasUnsavedChanges = false;
|
||||||
|
public bool HasUnsavedChanges {
|
||||||
|
get { return _HasUnsavedChanges; }
|
||||||
|
private set { _HasUnsavedChanges = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public Network GetNet { get { return StartingState; } }
|
public Network GetNet { get { return StartingState; } }
|
||||||
public int GetActionCount { get { if (CurrentNetAction == null) return 0; return CurrentNetAction.Actions.Count; } }
|
public int GetActionCount { get { if (CurrentNetAction == null) return 0; return CurrentNetAction.Actions.Count; } }
|
||||||
@ -68,6 +73,8 @@ namespace EduNetworkBuilder
|
|||||||
//Add this one
|
//Add this one
|
||||||
CurrentNetAction.HasBeenStored = true; //Note that we have stored it
|
CurrentNetAction.HasBeenStored = true; //Note that we have stored it
|
||||||
NetActions.Add(CurrentNetAction);
|
NetActions.Add(CurrentNetAction);
|
||||||
|
//Note that the long-term action list has some new actions which have not been saved
|
||||||
|
HasUnsavedChanges = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user