Пример #1
0
        private XElement GetFloatParameter(FloatParameter parameter)
        {
            XElement result = new XElement("parameter",
                                           new XAttribute("id", parameter.Id),
                                           new XAttribute("caption", parameter.Caption),
                                           new XAttribute("type", "float"),
                                           new XElement("values",
                                                        new XElement("current", (float)parameter.GetValue())));

            return(result);
        }
        public override bool Equals(Parameter other)
        {
            if (other == this)
            {
                return(true);
            }

            if (!(other is FloatParameter))
            {
                return(false);
            }

            FloatParameter otherAs = other as FloatParameter;

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