Exemple #1
0
        private XElement GetIntRangeParameter(IntRangeParameter parameter)
        {
            XElement result = new XElement("parameter",
                                           new XAttribute("id", parameter.Id),
                                           new XAttribute("caption", parameter.Caption),
                                           new XAttribute("type", "range_int"),
                                           new XElement("values",
                                                        new XElement("current", (int)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 IntRangeParameter))
            {
                return(false);
            }

            IntRangeParameter otherAs = other as IntRangeParameter;

            return(other.Id == Id && value == otherAs.value && other.Caption == Caption && otherAs.Maximum == Maximum && otherAs.Minimum == Minimum);
        }