public RadioPanelKnobUH1H(int group, int mask, bool isOn, RadioPanelPZ69KnobsUH1H radioPanelPZ69Knob) { Group = group; Mask = mask; IsOn = isOn; RadioPanelPZ69Knob = radioPanelPZ69Knob; }
public void ImportString(string str) { if (string.IsNullOrEmpty(str)) { throw new ArgumentException("Import string empty. (RadioPanelKnob)"); } if (!str.StartsWith("RadioPanelKnob{") || !str.EndsWith("}")) { throw new ArgumentException("Import string format exception. (RadioPanelKnob) >" + str + "<"); } //RadioPanelKnob{SWITCHKEY_MASTER_ALT} var dataString = str.Remove(0, 15); //SWITCHKEY_MASTER_ALT} dataString = dataString.Remove(dataString.Length - 1, 1); //SWITCHKEY_MASTER_ALT RadioPanelPZ69Knob = (RadioPanelPZ69KnobsUH1H)Enum.Parse(typeof(RadioPanelPZ69KnobsUH1H), dataString.Trim()); }