Exemple #1
0
        public static ZoneContract ToContract(this clsZone zone)
        {
            ZoneContract ret = new ZoneContract();

            ret.id       = (ushort)zone.Number;
            ret.zonetype = zone.ZoneType;
            ret.name     = zone.Name;
            ret.status   = zone.StatusText();
            ret.temp     = zone.TempText();

            return(ret);
        }
Exemple #2
0
        public static ZoneContract ToContract(this clsZone zone)
        {
            ZoneContract ret = new ZoneContract();

            ret.id       = (ushort)zone.Number;
            ret.zonetype = zone.ZoneType;
            ret.name     = zone.Name;
            ret.status   = zone.StatusText();

            if (zone.IsTemperatureZone())
            {
                ret.temp = zone.TempText();
            }
            else if (zone.IsHumidityZone())
            {
                ret.temp = zone.TempText();
            }

            return(ret);
        }