public void ProcessOp(OperationModuleList opModule, Dictionary<string, Node> _nodeElements, Dictionary<string, Section> _sectionElements) { if (opModule != null && opModule.operationModule != null && opModule.operationModule.Count > 0) { foreach (NetworkOperation op in opModule.operationModule) ProcessOp(op, _nodeElements, _sectionElements); } }
public void AddToOperation(OperationModuleList op) { //NetworkOperation op = new NetworkOperation(); //op.oldObj = null; //op.newObj = new Node(); //((Node)(op.newObj)).uid = "1"; //_nodeElements.Add(((Node)(op.newObj)).uid, (Node)(op.newObj)); //op.action = NetworkAction.Add; opList.Push(op); undoList.Clear(); }
public OperationModuleList ReverseOp(OperationModuleList opModule) { OperationModuleList revOpModule = new OperationModuleList(); if (opModule != null && opModule.operationModule != null && opModule.operationModule.Count > 0) { opModule.operationModule.Reverse(); foreach (NetworkOperation op in opModule.operationModule) { NetworkOperation newOp = ReverseOp(op); if (newOp != null) revOpModule.operationModule.Add(newOp); } } return revOpModule; }