protected new void ControlsToData()
        {
            base.ControlsToData();
            if (_controlLanguage == null)
            {
                if (rdoGeneric.Checked)
                    _controlLanguage = new Generic();
                else if (rdoRegister.Checked)
                    _controlLanguage = new Register();
                else if (rdoSCPI.Checked)
                    _controlLanguage = new SCPI();
                else
                {
                    _controlLanguage = new Generic();
                    rdoGeneric.Checked = true;
                }
            }
            if (rdoGeneric.Checked && !(_controlLanguage is Generic))
            {
                _controlLanguage = new Generic();
            }
            if (rdoRegister.Checked && !(_controlLanguage is Register))
            {
                _controlLanguage = new Register();
            }
            if (rdoSCPI.Checked && !(_controlLanguage is SCPI))
            {
                _controlLanguage = new SCPI();
            }

            _controlLanguage.Documentation = _document;
        }
 public static bool LoadFromFile(string fileName, out ControlLanguage obj)
 {
     Exception exception;
     return LoadFromFile(fileName, out obj, out exception);
 }
 public static bool Deserialize(string input, out ControlLanguage obj)
 {
     Exception exception;
     return Deserialize(input, out obj, out exception);
 }
 /// <summary>
 /// Deserializes xml markup from file into an ControlLanguage object
 /// </summary>
 /// <param name="fileName">string xml file to load and deserialize</param>
 /// <param name="obj">Output ControlLanguage 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 ControlLanguage obj, out Exception exception)
 {
     exception = null;
     obj = default(ControlLanguage);
     try
     {
         obj = LoadFromFile(fileName);
         return true;
     }
     catch (Exception ex)
     {
         exception = ex;
         return false;
     }
 }
 /// <summary>
 /// Deserializes workflow markup into an ControlLanguage object
 /// </summary>
 /// <param name="input">string workflow markup to deserialize</param>
 /// <param name="obj">Output ControlLanguage 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 ControlLanguage obj, out Exception exception)
 {
     exception = null;
     obj = default(ControlLanguage);
     try
     {
         obj = Deserialize(input);
         return true;
     }
     catch (Exception ex)
     {
         exception = ex;
         return false;
     }
 }