private void ControlsToData()
 {
     if (_DCPower == null)
         _DCPower = new PowerSpecificationsDC();
     _DCPower.Voltage = lmtVoltage.Limit;
     if( rbAmpres.Checked )
         _DCPower.ItemElementName = PowerSpecificationsDCItemChoiceType3.Amperage;
     if( rbPowerDraw.Checked )
         _DCPower.ItemElementName = PowerSpecificationsDCItemChoiceType3.PowerDraw;
     _DCPower.Item = lmtAmpresPower.Limit;
     _DCPower.Description = edtDescription.GetValue<string>();
     _DCPower.polarity = Convert.ToDouble(edtPolarity.Value);
     _DCPower.polaritySpecified = chkHasPolarity.Checked;
     _DCPower.ripple = Convert.ToDouble(edtRipple.Value);
     _DCPower.rippleSpecified = chkHasRipple.Checked;
     _DCPower.ConnectorPins = connectorLocationPinListControl.ConnectorLocations;
 }
 public static bool LoadFromFile(string fileName, out PowerSpecificationsDC obj)
 {
     Exception exception;
     return LoadFromFile(fileName, out obj, out exception);
 }
 public static bool Deserialize(string input, out PowerSpecificationsDC obj)
 {
     Exception exception;
     return Deserialize(input, out obj, out exception);
 }
 /// <summary>
 /// Deserializes xml markup from file into an PowerSpecificationsDC object
 /// </summary>
 /// <param name="fileName">string xml file to load and deserialize</param>
 /// <param name="obj">Output PowerSpecificationsDC object</param>
 /// <param name="exception">output Exception value if deserialize failed</param>
 /// <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
 public static bool LoadFromFile(string fileName, out PowerSpecificationsDC obj, out Exception exception)
 {
     exception = null;
     obj = default(PowerSpecificationsDC);
     try
     {
         obj = LoadFromFile(fileName);
         return true;
     }
     catch (Exception ex)
     {
         exception = ex;
         return false;
     }
 }
 /// <summary>
 /// Deserializes workflow markup into an PowerSpecificationsDC object
 /// </summary>
 /// <param name="input">string workflow markup to deserialize</param>
 /// <param name="obj">Output PowerSpecificationsDC object</param>
 /// <param name="exception">output Exception value if deserialize failed</param>
 /// <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
 public static bool Deserialize(string input, out PowerSpecificationsDC obj, out Exception exception)
 {
     exception = null;
     obj = default(PowerSpecificationsDC);
     try
     {
         obj = Deserialize(input);
         return true;
     }
     catch (Exception ex)
     {
         exception = ex;
         return false;
     }
 }