Ejemplo n.º 1
0
        public override SingleEO Clone(GEMSSingle parentSingle)
        {
            VoltageExcitation ve = new VoltageExcitation(parentSingle);

            ve.TimeDelay         = new Time(this.TimeDelay.Value, this.TimeDelay.Unit);
            ve.Positive          = this.Positive;
            ve.PhaseFrequency    = new Frequency(this.PhaseFrequency.Value, this.PhaseFrequency.Unit);
            ve.PhaseDelay        = this.PhaseDelay;
            ve.ExcitationVoltage = new Voltage(this.ExcitationVoltage.Value, this.ExcitationVoltage.Unit);

            return(ve);
        }
Ejemplo n.º 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);
        }