/// <summary> /// Load all operations from xml /// </summary> private void LoadOperations(XPathNavigator navigator) { //Information of geometry operation navigator.MoveToChild("Operations", string.Empty); XPathNodeIterator nodes = navigator.SelectChildren("Operation", string.Empty); while (nodes.MoveNext( )) { XPathNavigator operationNavigator = nodes.Current.Clone( ); string operationId = operationNavigator.GetAttribute("id", string.Empty); if (operationId != "-1") { XPathNavigator operationNode = navigator.SelectSingleNode("/Document/Operations/Operation[@id='" + operationId + "']"); if (operationNode != null) { //Get the geometry operation GeometryOperation operation = GeometryOperation.Create(operationNode, this); if (operation is GeometryCreateOperation) { createOperation = operation as GeometryCreateOperation; } //Add it to the list operations.Add(operation); //Add it to the list of GEMS Project Parent.AddOperation(operation); } } } navigator.MoveToParent( ); }
public void InitilizeSingle(GeometryCreateOperation createOperation) { this.name = "Single" + id.ToString( ); //Binding with create operation this.createOperation = createOperation; this.createOperation.Parent = this; this.operations.Add(createOperation); //Create the geometry model to display UpdatePrimaryModel( ); }