示例#1
0
        private XElement GetIntegerParameter(IntegerParameter parameter)
        {
            XElement result = new XElement("parameter",
                                           new XAttribute("id", parameter.Id),
                                           new XAttribute("caption", parameter.Caption),
                                           new XAttribute("type", "integer"),
                                           new XElement("values",
                                                        new XElement("current", (int)parameter.GetValue())));

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

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

            IntegerParameter otherAs = other as IntegerParameter;

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