Beispiel #1
0
        public override SingleEO Clone(GEMSSingle parentSingle)
        {
            CurrentOutput co = new CurrentOutput(parentSingle);

            co.Positive = this.Positive;

            return(co);
        }
Beispiel #2
0
        public static SingleEO Load(XPathNavigator navigator, GEMSSingle parent)
        {
            SingleEO singleEO = null;

            switch (parent.CreateOperation.Name)
            {
            case GeometryOperation.GeometryOperationType.CreateLine:          //Voltage Excitation or Output
                if (navigator.MoveToChild("VoltageExcitation", string.Empty))
                {
                    singleEO = new VoltageExcitation(navigator, parent);
                }
                else if (navigator.MoveToChild("VoltageOutput", string.Empty))
                {
                    singleEO = new VoltageOutput(navigator, parent);
                }

                break;

            case GeometryOperation.GeometryOperationType.CreatePoint:         //FieldPointOutPut
                if (navigator.MoveToChild("FieldOnPointOutput", string.Empty))
                {
                    //((Point)operations[0]).BFieldOutput = true;
                    singleEO = new PointOutput(navigator, parent);
                }
                break;

            case GeometryOperation.GeometryOperationType.CreateRectangle:  //Current Excitation or Output
            case GeometryOperation.GeometryOperationType.CreateRound:      //Current Excitation or Output
                if (navigator.MoveToChild("CurrentExcitation", string.Empty))
                {
                    singleEO = new CurrentExcitation(navigator, parent);
                }
                else if (navigator.MoveToChild("CurrentOutput", string.Empty))
                {
                    singleEO = new CurrentOutput(navigator, parent);
                }
                break;

            default:
                break;
            }

            return(singleEO);
        }