private void cmbPropertyType_SelectedIndexChanged(object sender, EventArgs e) { gbAnalogTrigger.Enabled = false; gbDigitalTrigger.Enabled = false; if (cmbPropertyType.SelectedItem != null && (_property == null || _newProperty)) { ResetComboBoxes(); SetControlStates(); switch (cmbPropertyType.SelectedIndex) { case (int) enumPropertTypes.Digital: _property = new DigitalTriggerPropertyGroup(); break; case (int) enumPropertTypes.Analog: _property = new AnalogTriggerPropertyGroup(); break; case (int) enumPropertTypes.LAN: _property = new LANTriggerPropertyGroup(); break; case (int) enumPropertTypes.Software: _property = new SoftwareTriggerPropertyGroup(); break; } } }
public static bool LoadFromFile(string fileName, out TriggerPropertyGroup obj) { Exception exception; return LoadFromFile(fileName, out obj, out exception); }
public static bool Deserialize(string input, out TriggerPropertyGroup obj) { Exception exception; return Deserialize(input, out obj, out exception); }
/// <summary> /// Deserializes xml markup from file into an TriggerPropertyGroup object /// </summary> /// <param name="fileName">string xml file to load and deserialize</param> /// <param name="obj">Output TriggerPropertyGroup 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 TriggerPropertyGroup obj, out Exception exception) { exception = null; obj = default(TriggerPropertyGroup); try { obj = LoadFromFile(fileName); return true; } catch (Exception ex) { exception = ex; return false; } }
/// <summary> /// Deserializes workflow markup into an TriggerPropertyGroup object /// </summary> /// <param name="input">string workflow markup to deserialize</param> /// <param name="obj">Output TriggerPropertyGroup 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 TriggerPropertyGroup obj, out Exception exception) { exception = null; obj = default(TriggerPropertyGroup); try { obj = Deserialize(input); return true; } catch (Exception ex) { exception = ex; return false; } }