CrabtreeOn,印度客户定制APP,迁移2.0平台版本
1
wxr
2023-03-31 d53e6af2c5f17838fa79659614b15a2a1f383399
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
using System;
namespace Shared
{
    /// <summary>
    /// 空调
    /// </summary>
    [System.Serializable]
    public class AC : Common
    {
        //public AC(){
        //    this.Type = DeviceType.ACHVAC;
        //    DeviceTextID = SimpleControl.R.MyInternationalizationString.AC;
        //}
 
        /// <summary>
        /// 温度模式
        /// </summary>
        public byte TemperatureMode;
        /// <summary>
        /// 室内温度
        /// </summary>
        public byte IndoorTemperature;
        /// <summary>
        /// 制冷温度
        /// </summary>
        public byte CoolTemperature;
        /// <summary>
        /// 制热温度
        /// </summary>
        public byte HeatTemperature;
        /// <summary>
        /// 自动温度
        /// </summary>
        public byte AutoTemperature;
        /// <summary>
        /// 除湿温度
        /// </summary>
        public byte ChuShiTemperature;
        /// <summary>
        /// 实际工作模式及风速
        /// </summary>
        public byte RealModeAndFanSpeed;
        /// <summary>
        /// 开关
        /// </summary>
        public byte Power;
        /// <summary>
        /// 设置模式
        /// </summary>
        public byte SetMode;
        /// <summary>
        /// 设置风速
        /// </summary>
        public byte SetFanSpeed;
        /// <summary>
        /// 设置温度
        /// </summary>
        public byte SetTemperature = 25;
        /// <summary>
        /// 扫风模式
        /// </summary>
        public byte ShaoFanMode;
 
        public string Windpicture = "AC/ACAuto.png";
 
        public string Modepicture = "AC/ACRefrigeration.png";
 
        /// <summary>
        /// 模式A协议属性
        /// </summary>
        /// <returns></returns>
        public string SetModeAttribute {
            get {
                //return SetMode switch {
                //    0 => "cool",
                //    1 => "heat",
                //    2 => "fan",
                //    3 => "auto",
                //    4 => "dry",
                //    _ => "cool",
                //};
                string mode;
                switch (SetMode) {
                case 0:
                    mode = "cool";
                    break;
                case 1:
                    mode = "heat";
                    break;
                case 2:
                    mode = "fan";
                    break;
                case 3:
                    mode = "auto";
                    break;
                case 4:
                    mode = "dry";
                    break;
                default:
                    mode = "cool";
                    break;
                }
                return mode;
            }
        }
 
        /// <summary>
        /// 风速A协议属性
        /// </summary>
        /// <returns></returns>
        public string SetFanSpeedAttribute {
            get {
                //return SetFanSpeed switch {
                //    0 => "auto",
                //    1 => "high",
                //    2 => "medium",
                //    3 => "low",
                //    _ => "high",
                //};
 
                string speed;
                switch (SetFanSpeed) {
                case 0:
                    speed = "auto";
                    break;
                case 1:
                    speed = "high";
                    break;
                case 2:
                    speed = "medium";
                    break;
                case 3:
                    speed = "low";
                    break;
                default:
                    speed = "high";
                    break;
                }
                return speed;
            }
        }
 
 
 
 
    }
}