private XElement GetFloatRangeParameter(FloatRangeParameter parameter) { XElement result = new XElement("parameter", new XAttribute("id", parameter.Id), new XAttribute("caption", parameter.Caption), new XAttribute("type", "range_float"), new XElement("values", new XElement("current", (float)parameter.GetValue()), new XElement("min", parameter.Minimum), new XElement("max", parameter.Maximum) )); return(result); }
public override bool Equals(Parameter other) { if (other == this) { return(true); } if (!(other is FloatRangeParameter)) { return(false); } FloatRangeParameter otherAs = other as FloatRangeParameter; return(other.Id == Id && value == otherAs.value && other.Caption == Caption && otherAs.Maximum == Maximum && otherAs.Minimum == Minimum); }