| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using System.Xml;
- namespace System.Net.HomeMatic {
- public class HMProtocol : HMElement {
- //start="0" show="0" count="0"
- private int _start;
- private int _show;
- private int _count;
- public HMProtocol(HMApi Api) : base(Api) {
- }
- public HMProtocol(HMApi Api, XmlNode Data) : base(Api) {
- this.Init(Data);
- }
- private void Init(XmlNode Data) {
- this._start = this.Attr_Int32(Data, "start");
- this._show = this.Attr_Int32(Data, "show");
- this._count = this.Attr_Int32(Data, "count");
- }
- public int Start {
- get { return this._start; }
- }
- public int Show {
- get { return this._show; }
- }
- public int Count {
- get { return this._count; }
- }
- /*public override bool Equals(object o) {
- if (o == null) return false;
- if (((HMProtocol)o).Start == this._start &&
- ((HMProtocol)o).Show == this._show &&
- ((HMProtocol)o).Count == this._count)
- return true;
- else
- return false;
- }
- public static bool operator ==(HMProtocol c1, HMProtocol c2) {
- if (c1 == null || c2 == null) return c1 == null && c2 == null;
- return c1.Equals(c2);
- }
- public static bool operator !=(HMProtocol c1, HMProtocol c2) {
- if (c1 == null || c2 == null) return (c1 != null || c2 != null);
- return !c1.Equals(c2);
- }*/
- public override string ToString() {
- return "[System.Net.HomeMatic.HMProtocol[" + this.ValuesToString() + "]]";
- }
- private string ValuesToString() {
- return this._start.ToString() + ";" +
- this._show.ToString() + ";" +
- this._count.ToString() + ";";
- }
- public override int GetHashCode() {
- return this.ToString().GetHashCode();
- }
- }
- }
|