2个文件已添加
	
		
		29个文件已修改
	
		
		1 文件已重命名
	
	
 
	
	
	
	
	
	
	
	
 |  |  | 
 |  |  | <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> | 
 |  |  |   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> | 
 |  |  |   <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/Entity/Function/Function.cs"> | 
 |  |  |   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.94B44E9C-E1BC-4BF7-812E-FC71E9B623B2" /> | 
 |  |  |   <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs"> | 
 |  |  |     <Files> | 
 |  |  |       <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs" Line="32" Column="1" /> | 
 |  |  |       <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs" Line="55" Column="50" /> | 
 |  |  |       <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs" Line="68" Column="12" /> | 
 |  |  |       <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="201" Column="55" /> | 
 |  |  |       <File FileName="HDL_ON/UI/MainPage.cs" Line="29" Column="55" /> | 
 |  |  |       <File FileName="HDL-ON_iOS/Info.plist" /> | 
 |  |  |       <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs" Line="226" Column="14" /> | 
 |  |  |       <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="1784" Column="17" /> | 
 |  |  |       <File FileName="HDL_ON/Entity/Function/Function.cs" Line="1" Column="1" /> | 
 |  |  |       <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="602" Column="12" /> | 
 |  |  |       <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="713" Column="51" /> | 
 |  |  |       <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs" Line="217" Column="26" /> | 
 |  |  |       <File FileName="HDL_ON/Entity/FunctionList.cs" Line="106" Column="47" /> | 
 |  |  |       <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" Line="341" Column="52" /> | 
 |  |  |       <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs" Line="191" Column="14" /> | 
 |  |  |     </Files> | 
 |  |  |     <Pads> | 
 |  |  |       <Pad Id="ProjectPad"> | 
 |  |  |         <State name="__root__"> | 
 |  |  |           <Node name="HDL_APP_Project" expanded="True"> | 
 |  |  |             <Node name="HDL_ON" expanded="True"> | 
 |  |  |               <Node name="DAL" expanded="True"> | 
 |  |  |                 <Node name="Server" expanded="True" /> | 
 |  |  |               </Node> | 
 |  |  |               <Node name="Entity" expanded="True"> | 
 |  |  |                 <Node name="Function" expanded="True"> | 
 |  |  |                   <Node name="Function.cs" selected="True" /> | 
 |  |  |                 </Node> | 
 |  |  |                 <Node name="Function" expanded="True" /> | 
 |  |  |               </Node> | 
 |  |  |               <Node name="UI" expanded="True"> | 
 |  |  |                 <Node name="UI1-Login" expanded="True" /> | 
 |  |  |                 <Node name="UI2" expanded="True"> | 
 |  |  |                   <Node name="4-PersonalCenter" expanded="True"> | 
 |  |  |                     <Node name="AddFunction" expanded="True" /> | 
 |  |  |                   <Node name="1-HomePage" expanded="True" /> | 
 |  |  |                   <Node name="FuntionControlView" expanded="True"> | 
 |  |  |                     <Node name="1ContorlPage" expanded="True"> | 
 |  |  |                       <Node name="FhControlPage.cs" selected="True" /> | 
 |  |  |                     </Node> | 
 |  |  |                   </Node> | 
 |  |  |                 </Node> | 
 |  |  |               </Node> | 
 |  |  |             </Node> | 
 |  |  |             <Node name="HDL-ON_Android" expanded="True"> | 
 |  |  |               <Node name="Assets" expanded="True"> | 
 |  |  |                 <Node name="Phone" expanded="True"> | 
 |  |  |                   <Node name="Collection" expanded="True" /> | 
 |  |  |                 </Node> | 
 |  |  |               </Node> | 
 |  |  |             </Node> | 
 |  |  |             <Node name="HDL-ON_iOS" expanded="True"> | 
 |  |  |               <Node name="References" expanded="True" /> | 
 |  |  |               <Node name="Resources" expanded="True"> | 
 |  |  |                 <Node name="Phone" expanded="True"> | 
 |  |  |                   <Node name="Collection" expanded="True" /> | 
 |  |  |                 </Node> | 
 |  |  |               </Node> | 
 |  |  |             </Node> | 
 |  |  | 
 |  |  |     <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> | 
 |  |  |     <String>Shared.IOS/Shared.IOS.csproj</String> | 
 |  |  |   </DisabledProjects> | 
 |  |  |   <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> | 
 |  |  |   <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> | 
 |  |  |   <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> | 
 |  |  |   <MonoDevelop.Ide.DebuggingService.Breakpoints> | 
 |  |  |     <BreakpointStore> | 
 |  |  |       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs" line="56" column="1" /> | 
 |  |  |     </BreakpointStore> | 
 |  |  |     <BreakpointStore /> | 
 |  |  |   </MonoDevelop.Ide.DebuggingService.Breakpoints> | 
 |  |  |   <MultiItemStartupConfigurations /> | 
 |  |  | </Properties> | 
 
 |  |  | 
 |  |  | <?xml version="1.0" encoding="utf-8"?> | 
 |  |  | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103171" android:versionName="1.1.202103171" package="com.hdl.onpro"> | 
 |  |  | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103184" android:versionName="1.1.202103184" package="com.hdl.onpro"> | 
 |  |  |     <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" /> | 
 |  |  |     <!--  定位权限--> | 
 |  |  |     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | 
 
 |  |  | 
 |  |  |     <key>UIStatusBarStyle</key> | 
 |  |  |     <string>UIStatusBarStyleLightContent</string> | 
 |  |  |     <key>CFBundleShortVersionString</key> | 
 |  |  |     <string>1.1.202103171</string> | 
 |  |  |     <string>1.1.202103181</string> | 
 |  |  |     <key>CFBundleVersion</key> | 
 |  |  |     <string>202103171</string> | 
 |  |  |     <string>202103181</string> | 
 |  |  |     <key>NSLocationWhenInUseUsageDescription</key> | 
 |  |  |     <string>Use geographic location to provide services such as weather</string> | 
 |  |  |     <key>NSAppleMusicUsageDescription</key> | 
 
 |  |  | 
 |  |  |                             case SPK.SensorTVOC: | 
 |  |  |                             case SPK.SensorTemperature: | 
 |  |  |                             case SPK.SensorHumidity: | 
 |  |  |                                 var sensor = FunctionList.List.GetEnvirSensorsList().Find((obj) => obj.sid == updateTemp.sid); | 
 |  |  |                                 if (sensor != null) | 
 |  |  |                                 { | 
 |  |  |                                     localObj = sensor; | 
 |  |  |                                     foreach (var attr in updateTemp.status) | 
 |  |  |                                     { | 
 |  |  |                                         var localAttr = sensor.attributes.Find((obj) => obj.key == attr.key); | 
 |  |  |                                         if (localAttr != null) | 
 |  |  |                                         { | 
 |  |  |                                             localAttr.curValue = attr.value; | 
 |  |  |                                         } | 
 |  |  |                                     } | 
 |  |  |                                     EnvironmentalSciencePage.LoadEvent_UpdataStatus(sensor); | 
 |  |  |                                 } | 
 |  |  |                                 EnvironmentalSciencePage.LoadEvent_UpdataStatus(localFunction); | 
 |  |  |                                 break; | 
 |  |  |                             case SPK.ElectricSocket: | 
 |  |  |                                 var es = FunctionList.List.GetElectricSocketList().Find((obj) => obj.sid == updateTemp.sid); | 
 |  |  |                                 if (es != null) | 
 |  |  |                                 { | 
 |  |  |                                     localObj = es; | 
 |  |  |                                     foreach (var attr in updateTemp.status) | 
 |  |  |                                     { | 
 |  |  |                                         var localAttr = es.attributes.Find((obj) => obj.key == attr.key); | 
 |  |  |                                         if (localAttr != null) | 
 |  |  |                                         { | 
 |  |  |                                             localAttr.curValue = attr.value; | 
 |  |  |                                         } | 
 |  |  |                                     } | 
 |  |  |                                     SocketPage.UpdataState(es); | 
 |  |  |                                 } | 
 |  |  |                                 SocketPage.UpdataState(localFunction); | 
 |  |  |                                 break; | 
 |  |  |                             case SPK.ElectricTV: | 
 |  |  |                                 break; | 
 
 |  |  | 
 |  |  |     { | 
 |  |  |  | 
 |  |  |         #region **********全局常量********** | 
 |  |  |         ///// <summary> | 
 |  |  |         ///// API_HTTPS | 
 |  |  |         ///// </summary> | 
 |  |  |         //public const string API_HTTPS = "https://"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 固定域名,正式环境 | 
 |  |  |         /// 公共域名就近解析 | 
 |  |  |         /// </summary> | 
 |  |  |         //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; | 
 |  |  |         public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// RegionMark | 
 |  |  |         /// </summary> | 
 |  |  | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region **********网络请求封装********** | 
 |  |  |         /// <summary> | 
 |  |  |         /// 固定域名,正式环境 | 
 |  |  |         /// 公共域名就近解析 | 
 |  |  |         /// </summary> | 
 |  |  |         //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; | 
 |  |  |         public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         ///  Get  请求服务器方法 | 
 
 |  |  | 
 |  |  | using System; | 
 |  |  | using System.Collections.Generic; | 
 |  |  | using Shared; | 
 |  |  |  | 
 |  |  | namespace HDL_ON.Entity | 
 |  |  | { | 
 |  |  | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 获取模式的icon路径 | 
 |  |  |         /// <param name="lightingIcon">获取的图标类型,默认是点亮</param> | 
 |  |  |         /// </summary> | 
 |  |  |         public string GetModeImage(Function function) | 
 |  |  |         public string GetModeIconPath(string modeValue, bool lighting = true) | 
 |  |  |         { | 
 |  |  |             var imagePath = "FunctionIcon/AC/HeatingIcon.png"; | 
 |  |  |             var key = function.GetAttrState(FunctionAttributeKey.Mode); | 
 |  |  |             switch (key) | 
 |  |  |             //var key = function.GetAttrState(FunctionAttributeKey.Mode); | 
 |  |  |             if (lighting) | 
 |  |  |             { | 
 |  |  |                 case "day": | 
 |  |  |                     imagePath = "FunctionIcon/AC/HeatingIcon.png"; | 
 |  |  |                     break; | 
 |  |  |                 case "night": | 
 |  |  |                     imagePath = "FunctionIcon/FloorHeating/NightIcon.png"; | 
 |  |  |                     break; | 
 |  |  |                 case "away": | 
 |  |  |                     imagePath = "FunctionIcon/FloorHeating/AwayIcon.png"; | 
 |  |  |                     break; | 
 |  |  |                 case "timer": | 
 |  |  |                     imagePath = "FunctionIcon/AC/AutoIcon.png"; | 
 |  |  |                     break; | 
 |  |  |                 case "normal": | 
 |  |  |                     imagePath = "FunctionIcon/FloorHeating/OrdinaryIcon.png"; | 
 |  |  |                     break; | 
 |  |  |                 default: | 
 |  |  |                     imagePath = "FunctionIcon/AC/HeatingIcon.png"; | 
 |  |  |                     break; | 
 |  |  |                 switch (modeValue) | 
 |  |  |                 { | 
 |  |  |                     case "day": | 
 |  |  |                         imagePath = "FunctionIcon/AC/HeatingIcon.png"; | 
 |  |  |                         break; | 
 |  |  |                     case "night": | 
 |  |  |                         imagePath = "FunctionIcon/FloorHeating/NightIcon.png"; | 
 |  |  |                         break; | 
 |  |  |                     case "away": | 
 |  |  |                         imagePath = "FunctionIcon/FloorHeating/AwayIcon.png"; | 
 |  |  |                         break; | 
 |  |  |                     case "timer": | 
 |  |  |                         imagePath = "FunctionIcon/AC/AutoIcon.png"; | 
 |  |  |                         break; | 
 |  |  |                     case "normal": | 
 |  |  |                         imagePath = "FunctionIcon/FloorHeating/OrdinaryIcon.png"; | 
 |  |  |                         break; | 
 |  |  |                     default: | 
 |  |  |                         imagePath = "FunctionIcon/AC/HeatingIcon.png"; | 
 |  |  |                         break; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  |                 switch (modeValue) | 
 |  |  |                 { | 
 |  |  |                     case "day": | 
 |  |  |                         imagePath = "FunctionIcon/AC/HeatingIconGray.png"; | 
 |  |  |                         break; | 
 |  |  |                     case "night": | 
 |  |  |                         imagePath = "FunctionIcon/FloorHeating/NightIconGray.png"; | 
 |  |  |                         break; | 
 |  |  |                     case "away": | 
 |  |  |                         imagePath = "FunctionIcon/FloorHeating/AwayIconGray.png"; | 
 |  |  |                         break; | 
 |  |  |                     case "timer": | 
 |  |  |                         imagePath = "FunctionIcon/AC/AutoIconGray.png"; | 
 |  |  |                         break; | 
 |  |  |                     case "normal": | 
 |  |  |                         imagePath = "FunctionIcon/FloorHeating/OrdinaryIconGray.png"; | 
 |  |  |                         break; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             return imagePath; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 获取模式属性文本 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public string GetModeAttrText(string value) | 
 |  |  |         { | 
 |  |  |             string text = ""; | 
 |  |  |             switch (value) | 
 |  |  |             { | 
 |  |  |                 case "day": | 
 |  |  |                     text = Language.StringByID(StringId.Day); | 
 |  |  |                     break; | 
 |  |  |                 case "night": | 
 |  |  |                     text = Language.StringByID(StringId.Night); | 
 |  |  |                     break; | 
 |  |  |                 case "away": | 
 |  |  |                     text = Language.StringByID(StringId.Away); | 
 |  |  |                     break; | 
 |  |  |                 case "timer": | 
 |  |  |                     text = Language.StringByID(StringId.Auto); | 
 |  |  |                     break; | 
 |  |  |                 case "normal": | 
 |  |  |                     text = Language.StringByID(StringId.Normal); | 
 |  |  |                     break; | 
 |  |  |             } | 
 |  |  |             return text; | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     public static class SPK | 
 |  |  |     { | 
 |  |  |  | 
 |  |  |         #region 灯光 | 
 |  |  |         /// <summary> | 
 |  |  |         /// (开关灯) | 
 |  |  |         /// </summary> | 
 |  |  | 
 |  |  |         /// (CCT灯) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string LightCCT = "light.cct"; | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 灯光spk列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public static List<string> LightSpkList() | 
 |  |  |         { | 
 |  |  |             var spkList = new List<string>(); | 
 |  |  |             spkList.Add(LightCCT); | 
 |  |  |             spkList.Add(LightDimming); | 
 |  |  |             spkList.Add(LightRGB); | 
 |  |  |             spkList.Add(LightRGBW); | 
 |  |  |             spkList.Add(LightSwitch); | 
 |  |  |             return spkList; | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 窗帘 | 
 |  |  |         /// <summary> | 
 |  |  |         /// (开关窗帘) | 
 |  |  |         /// </summary> | 
 |  |  | 
 |  |  |         /// (卷帘) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string CurtainRoller = "curtain.roller"; | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 窗帘spk列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public static List<string> CurtainSpkList() | 
 |  |  |         { | 
 |  |  |             var spkList = new List<string>(); | 
 |  |  |             spkList.Add(CurtainRoller); | 
 |  |  |             spkList.Add(CurtainSwitch); | 
 |  |  |             spkList.Add(CurtainShades); | 
 |  |  |             spkList.Add(CurtainTrietex); | 
 |  |  |             return spkList; | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 空调 | 
 |  |  |         /// <summary> | 
 |  |  |         /// (空调) | 
 |  |  |         /// </summary> | 
 |  |  | 
 |  |  |         /// (红外空调) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string AcIr= "ir.ac"; | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 空调spk列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public static List<string> AcSpkList() | 
 |  |  |         { | 
 |  |  |             var spkList = new List<string>(); | 
 |  |  |             spkList.Add(AcStandard); | 
 |  |  |             spkList.Add(AcIr); | 
 |  |  |             return spkList; | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 地热 | 
 |  |  |         /// <summary> | 
 |  |  |         /// (地热) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string FloorHeatStandard = "floorHeat.standard"; | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 地热spk列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public static List<string> FhSpkList() | 
 |  |  |         { | 
 |  |  |             var spkList = new List<string>(); | 
 |  |  |             spkList.Add(FloorHeatStandard); | 
 |  |  |             return spkList; | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 新风 | 
 |  |  |         /// <summary> | 
 |  |  |         /// (新风) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string AirFreshStandard = "airFresh.standard"; | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 新风spk列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public static List<string> AirFreshSpkList() | 
 |  |  |         { | 
 |  |  |             var spkList = new List<string>(); | 
 |  |  |             spkList.Add(AirFreshStandard); | 
 |  |  |             return spkList; | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 音乐 | 
 |  |  |         /// <summary> | 
 |  |  |         /// (音乐) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string MusicStandard = "music.standard"; | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 音乐spk列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public static List<string> MusicSpkList() | 
 |  |  |         { | 
 |  |  |             var spkList = new List<string>(); | 
 |  |  |             spkList.Add(MusicStandard); | 
 |  |  |             return spkList; | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 传感器 | 
 |  |  |         #region 安防传感器 | 
 |  |  |         /// <summary> | 
 |  |  |         /// (亮度传感器) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorLight = "sensor.light"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// (红外移动传感器) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorPir = "sensor.pir"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// (门窗传感器) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorDoorWindow = "sensor.doorwindow"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 烟雾传感器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorSmoke = "sensor.smoke"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 水浸传感器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorWater = "sensor.water"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 燃气传感器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorGas = "sensor.gas"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 红外珊栏传感器       | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorShanLan = "sensor.shanlan"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 红外对射传感器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorDuiShe = "sensor.duishe"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 超声波传感器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensoruUtrasonic = "sensor.ultrasonic"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// (干接点) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorDryContact = "sensor.dryContact"; | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 安防传感器spk列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public static List<string> ArmSensorSpkList() | 
 |  |  |         { | 
 |  |  |             var spkList = new List<string>(); | 
 |  |  |             spkList.Add(SensorLight); | 
 |  |  |             spkList.Add(SensorPir); | 
 |  |  |             spkList.Add(SensorDoorWindow); | 
 |  |  |             spkList.Add(SensorSmoke); | 
 |  |  |             spkList.Add(SensorWater); | 
 |  |  |             spkList.Add(SensorGas); | 
 |  |  |             spkList.Add(SensorShanLan); | 
 |  |  |             spkList.Add(SensorDuiShe); | 
 |  |  |             spkList.Add(SensoruUtrasonic); | 
 |  |  |             spkList.Add(SensorDryContact); | 
 |  |  |             return spkList; | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 环境传感器 | 
 |  |  |         /// <summary> | 
 |  |  |         /// (温度传感器) | 
 |  |  |         /// </summary> | 
 |  |  | 
 |  |  |         public const string SensorHumidity = "sensor.humidity"; | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// (红外移动传感器) | 
 |  |  |         /// 环境传感器spk列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorPir = "sensor.pir"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// (门窗传感器) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorDoorWindow = "sensor.doorwindow"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 烟雾传感器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorSmoke = "sensor.smoke"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 水浸传感器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorWater = "sensor.water"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 燃气传感器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorGas= "sensor.gas"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 红外珊栏传感器       | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorShanLan = "sensor.shanlan"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 红外对射传感器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorDuiShe = "sensor.duishe"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 超声波传感器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensoruUtrasonic = "sensor.ultrasonic"; | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public static List<string> EnvironSpkList() | 
 |  |  |         { | 
 |  |  |             var spkList = new List<string>(); | 
 |  |  |             spkList.Add(SensorTemperature); | 
 |  |  |             spkList.Add(SensorPm25); | 
 |  |  |             spkList.Add(SensorCO2); | 
 |  |  |             spkList.Add(SensorTVOC); | 
 |  |  |             spkList.Add(SensorHumidity); | 
 |  |  |             return spkList; | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// (干接点) | 
 |  |  |         /// </summary> | 
 |  |  |         public const string SensorDryContact = "sensor.dryContact"; | 
 |  |  |         #region 家电 | 
 |  |  |         /// <summary> | 
 |  |  |         /// 家电、插座 | 
 |  |  |         /// </summary> | 
 |  |  | 
 |  |  |         /// </summary> | 
 |  |  |         public const string ElectricFan = "electrical.fan"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 凉霸 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string ClothesHanger = "electrical.racks"; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 红外遥控器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string IrLearn = "ir.learn"; | 
 |  |  |         #region 涂鸦 | 
 |  |  |         /// <summary> | 
 |  |  |         /// 家电、涂鸦空气净化器 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string ElectricTuyaAirCleaner = "electrical.Q1RsefNf91tIXyyQ"; | 
 |  |  | 
 |  |  |         /// 家电、涂鸦水阀 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string ElectricTuyaWaterValve = "electrical.koiGhMKwLf2ZP81g"; | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 凉霸 | 
 |  |  |         /// 家电spk列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string ClothesHanger = "electrical.racks"; | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public static List<string> ElectricalSpkList() | 
 |  |  |         { | 
 |  |  |             var spkList = new List<string>(); | 
 |  |  |             spkList.Add(ElectricSocket); | 
 |  |  |             spkList.Add(ElectricTV); | 
 |  |  |             spkList.Add(TvIr); | 
 |  |  |             spkList.Add(ElectricFan); | 
 |  |  |             spkList.Add(ClothesHanger); | 
 |  |  |             spkList.Add(IrLearn); | 
 |  |  |             spkList.Add(ElectricTuyaAirCleaner); | 
 |  |  |             spkList.Add(ElectricTuyaFan); | 
 |  |  |             spkList.Add(ElectricTuyaWeepRobot); | 
 |  |  |             spkList.Add(ElectricTuyaWaterValve); | 
 |  |  |             return spkList; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 设备类 | 
 |  |  |         /// <summary> | 
 |  |  |         /// 红外宝 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string IrModule = "ir.module"; | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 红外遥控器 | 
 |  |  |         /// 设备类spk列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public const string IrLearn = "ir.learn"; | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public static List<string> DeviceSpkList() | 
 |  |  |         { | 
 |  |  |             var spkList = new List<string>(); | 
 |  |  |             spkList.Add(IrModule); | 
 |  |  |             return spkList; | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  | 
 |  |  |             return list; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 第三方品牌列表 | 
 |  |  |         /// </summary> | 
 
 |  |  | 
 |  |  |         /// 功能列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> Functions = new List<Function>(); | 
 |  |  |         /// <summary> | 
 |  |  |         /// 设备spk列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public List<string> DeviceSpk = new List<string>() { | 
 |  |  |             SPK.IrModule | 
 |  |  |         }; | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 空调列表 | 
 |  |  | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public List<Function> GetAcList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.AcStandard || obj.spk == SPK.AcIr); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         ///  | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public List<Function> GetList() | 
 |  |  |         { | 
 |  |  |             List<Function> list = new List<Function>(); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |             return list; | 
 |  |  |             var spkList = SPK.AcSpkList(); | 
 |  |  |             return Functions.FindAll((obj) => spkList.Contains(obj.spk)); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetLightList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => | 
 |  |  |                         obj.spk == SPK.LightSwitch | 
 |  |  |                      || obj.spk == SPK.LightDimming | 
 |  |  |                      || obj.spk == SPK.LightRGB | 
 |  |  |                      || obj.spk == SPK.LightRGBW | 
 |  |  |                      || obj.spk == SPK.LightCCT); | 
 |  |  |             var spkList = SPK.LightSpkList(); | 
 |  |  |             return Functions.FindAll((obj) => spkList.Contains(obj.spk)); | 
 |  |  |         } | 
 |  |  |         /// <summary> | 
 |  |  |         /// 窗帘列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetCurtainList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => | 
 |  |  |                        obj.spk == SPK.CurtainRoller | 
 |  |  |                     || obj.spk == SPK.CurtainShades | 
 |  |  |                     || obj.spk == SPK.CurtainSwitch | 
 |  |  |                     || obj.spk == SPK.CurtainTrietex | 
 |  |  |             ); | 
 |  |  |             var spkList = SPK.CurtainSpkList(); | 
 |  |  |             return Functions.FindAll((obj) => spkList.Contains(obj.spk)); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetFloorHeatingList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.FloorHeatStandard); | 
 |  |  |             var spkList = SPK.FhSpkList(); | 
 |  |  |             return Functions.FindAll((obj) => spkList.Contains(obj.spk)); | 
 |  |  |         } | 
 |  |  |         #region 家电列表 electricals | 
 |  |  |         /// <summary> | 
 |  |  | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetElectricals() | 
 |  |  |         { | 
 |  |  |  | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.ElectricFan || obj.spk == SPK.ElectricTuyaFan | 
 |  |  |                 || obj.spk == SPK.ElectricSocket | 
 |  |  |                 || obj.spk == SPK.IrLearn
 | 
 |  |  |                 || obj.spk == SPK.TvIr
 | 
 |  |  |                 || obj.spk == SPK.ElectricTV
 | 
 |  |  |                 || obj.spk == SPK.ElectricTuyaAirCleaner
 | 
 |  |  |                 || obj.spk == SPK.ElectricTuyaWeepRobot | 
 |  |  |                 || obj.spk == SPK.ElectricTuyaWaterValve | 
 |  |  |                 || obj.spk == SPK.ClothesHanger); | 
 |  |  |             var spkList = SPK.ElectricalSpkList(); | 
 |  |  |             return Functions.FindAll((obj) => spkList.Contains(obj.spk)); | 
 |  |  |         } | 
 |  |  |         /// <summary> | 
 |  |  |         /// 遥控器列表 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public List<Function> GetIrLearinList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.IrLearn); | 
 |  |  |         } | 
 |  |  |         /// <summary> | 
 |  |  |         /// 风扇列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetFanList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.ElectricFan || obj.spk == SPK.ElectricTuyaFan); | 
 |  |  |         } | 
 |  |  |         /// <summary> | 
 |  |  |         /// 电视列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetTVList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.ElectricTV || obj.spk == SPK.TvIr); | 
 |  |  |         } | 
 |  |  |         /// <summary> | 
 |  |  |         /// 家电插座列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetElectricSocketList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.ElectricSocket); | 
 |  |  |         }
 | 
 |  |  |         /// <summary> | 
 |  |  |         /// 空气净化器列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetAirCleanerList() | 
 |  |  |         {
 | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.ElectricTuyaAirCleaner);
 | 
 |  |  |         }
 | 
 |  |  |         /// <summary> | 
 |  |  |         /// 扫地机器人列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetWeepRobotList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.ElectricTuyaWeepRobot);
 | 
 |  |  |         } | 
 |  |  |         /// <summary> | 
 |  |  |         /// 水阀列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetWaterValveList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.ElectricTuyaWaterValve);
 | 
 |  |  |         } | 
 |  |  |         /// <summary> | 
 |  |  |         /// 凉霸列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetClothesHangerList () | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.ClothesHanger);
 | 
 |  |  |         } | 
 |  |  |      | 
 |  |  |        | 
 |  |  |         /// <summary> | 
 |  |  |         /// 红外宝列表 | 
 |  |  |         /// </summary> | 
 |  |  | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetEnvirSensorsList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.SensorPm25 | 
 |  |  |                     || obj.spk == SPK.SensorCO2 | 
 |  |  |                     || obj.spk == SPK.SensorTVOC | 
 |  |  |                     || obj.spk == SPK.SensorTemperature | 
 |  |  |                     || obj.spk == SPK.SensorHumidity
 | 
 |  |  |                     );
 | 
 |  |  |             var spkList = SPK.EnvironSpkList(); | 
 |  |  |             return Functions.FindAll((obj) => spkList.Contains(obj.spk));
 | 
 |  |  |         } | 
 |  |  |         /// <summary> | 
 |  |  |         /// 安防设备列表 | 
 |  |  |         /// </summary> | 
 |  |  |         public List<Function> GetArmSensorList() | 
 |  |  |         { | 
 |  |  |             return Functions.FindAll((obj) => obj.spk == SPK.SensorSmoke | 
 |  |  |                     || obj.spk == SPK.SensorWater | 
 |  |  |                     || obj.spk == SPK.SensorDoorWindow | 
 |  |  |                     || obj.spk == SPK.SensorPir | 
 |  |  |             ); | 
 |  |  |             var spkList = SPK.ArmSensorSpkList(); | 
 |  |  |             return Functions.FindAll((obj) => spkList.Contains(obj.spk)); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         public List<Scene> scenes = new List<Scene>(); | 
 
 |  |  | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\ReplicationView.cs" />
 | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\ClothesHangerSetTimePage.cs" />
 | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmSensor\ArmSensorHistroyPaging.cs" />
 | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\AC\AcControlPage.cs" />
 | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlCloudReceiveLogic.cs" />
 | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlWifiLogic.cs" />
 | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Controls\CompoundControls\ProgressRowBar.cs" />
 | 
 |  |  | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\DeviceListPage.cs" />
 | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\MainView.cs" />
 | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\HeigthChangeView.cs" />
 | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\AcControlPage.cs" />
 | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\FhControlPage.cs" />
 | 
 |  |  |     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\TvControlPage.cs" />
 | 
 |  |  |   </ItemGroup>
 | 
 |  |  |   <ItemGroup>
 | 
 |  |  |     <Folder Include="$(MSBuildThisFileDirectory)DAL\" />
 | 
 |  |  | 
 |  |  |     <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmSensor\" />
 | 
 |  |  |     <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\" />
 | 
 |  |  |     <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\" />
 | 
 |  |  |     <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\" />
 | 
 |  |  |   </ItemGroup>
 | 
 |  |  | </Project> | 
 
 |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 版本号 | 
 |  |  |         /// </summary> | 
 |  |  |         public static string VersionString = "1.1.0317"; | 
 |  |  |         public static string VersionString = "1.1.0318"; | 
 |  |  |         ///// <summary> | 
 |  |  |         ///// 客户端类型 | 
 |  |  |         ///// </summary> | 
 
 |  |  | 
 |  |  |                 //return; | 
 |  |  |                 if (b) | 
 |  |  |                 { | 
 |  |  |                     etAccount.Text = "274116637@qq.com";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654"; | 
 |  |  |                     etAccount.Text = "18316672920";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654"; | 
 |  |  |                     // "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568  | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     etAccount.Text = "15622703419";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374 | 
 |  |  |                     etAccount.Text = "15971583093";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374 | 
 |  |  |                     //15971583093 gs//tzy 274116637@qq.com | 
 |  |  |                 } | 
 |  |  |                 b = !b; | 
 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 LoadEvent_FunctionCollection(btnCollection, function); | 
 |  |  |                 if (function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || | 
 |  |  |                 if (//SPK.CurtainSpkList().Contains(function.spk)) | 
 |  |  |                     function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || | 
 |  |  |                     function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex ) | 
 |  |  |                 { | 
 |  |  |                     btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainIcon.png"; | 
 |  |  | 
 |  |  |                     LoadEvent_ControlCurtain(function, btnCurtainClose, btnCurtainOpen); | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 else if (function.spk == SPK.ElectricTV) | 
 |  |  |                 else if (function.spk == SPK.ElectricTV || function.spk == SPK.TvIr) | 
 |  |  |                 { | 
 |  |  |                     btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/TVIcon.png"; | 
 |  |  |                     Button btnPower; | 
 |  |  |                     btnPower = new Button() | 
 |  |  |                     { | 
 |  |  |                         X = Application.GetRealWidth(131), | 
 |  |  |                         Y = Application.GetRealHeight(86), | 
 |  |  |                         Y = Application.GetRealHeight(70), | 
 |  |  |                         Width = Application.GetRealWidth(32), | 
 |  |  |                         Height = Application.GetRealWidth(32), | 
 |  |  |                         UnSelectedImagePath = "Public/PowerClose.png", | 
 
 |  |  | 
 |  |  |         { | 
 |  |  |             button.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 new TV().ControlTV(InfraredCode_TV.Power, tV); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("on_off", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(tV, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     new TV().ControlTV(InfraredCode_TV.Power, tV); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |         } | 
 |  |  |  | 
 
 |  |  | 
 |  |  | using System; | 
 |  |  | using System.Collections.Generic; | 
 |  |  | using HDL_ON.DAL.Server; | 
 |  |  | using HDL_ON.Entity; | 
 |  |  | using HDL_ON.UI.CSS; | 
 |  |  | using Shared; | 
 |  |  | 
 |  |  |                             LoadRow(revData); | 
 |  |  |                         }); | 
 |  |  |                     } | 
 |  |  |                     else | 
 |  |  |                     { | 
 |  |  |                         IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |                 catch (Exception ex) | 
 |  |  |                 { | 
 
 |  |  | 
 |  |  | using System; | 
 |  |  | using System.Collections.Generic; | 
 |  |  | using HDL_ON.DAL.Server; | 
 |  |  | using HDL_ON.Entity; | 
 |  |  | using HDL_ON.UI.CSS; | 
 |  |  | using Shared; | 
 |  |  | 
 |  |  |                             }); | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                     else | 
 |  |  |                     { | 
 |  |  |                         IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |                 catch (Exception ex) | 
 |  |  |                 { | 
 
 |  |  | 
 |  |  | using System; | 
 |  |  | using System.Collections.Generic; | 
 |  |  | using HDL_ON.DAL.Server; | 
 |  |  | using HDL_ON.Entity; | 
 |  |  | using HDL_ON.UI.CSS; | 
 |  |  | using Shared; | 
 |  |  | 
 |  |  |                             LoadRow(revData.list); | 
 |  |  |                         }); | 
 |  |  |                     } | 
 |  |  |                     else | 
 |  |  |                     { | 
 |  |  |                         IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |                 catch (Exception ex) | 
 |  |  |                 { | 
 
 |  |  | 
 |  |  |                 TextAlignment = TextAlignment.Center, | 
 |  |  |                 TextColor = CSS_Color.FirstLevelTitleColor, | 
 |  |  |                 TextSize = CSS_FontSize.SubheadingFontSize, | 
 |  |  |                 Text = string.IsNullOrEmpty(UserInfo.Current.userName) ? Language.StringByID(StringId.UsersWhoNameIsEmpty) : UserInfo.Current.userName | 
 |  |  |                 Text = UserInfo.Current.userName// string.IsNullOrEmpty(UserInfo.Current.userName) ? Language.StringByID(StringId.UsersWhoNameIsEmpty) : UserInfo.Current.userName | 
 |  |  |             }; | 
 |  |  |             personalInfoView.AddChidren(btnUserName); | 
 |  |  |             if (!string.IsNullOrEmpty( UserInfo.Current.userName)) | 
 |  |  |             if (!string.IsNullOrEmpty( UserInfo.Current.userName) && UserInfo.Current.userName == UserInfo.Current.AccountString) | 
 |  |  |             { | 
 |  |  |                 btnUserName.Text =  UserInfo.Current.userName; ; | 
 |  |  |                 btnUserName.Text = Language.StringByID(StringId.UsersWhoNameIsEmpty); | 
 |  |  |             } | 
 |  |  |             btnEmail = new Button() | 
 |  |  |             { | 
 
| New file | 
 |  |  | 
 |  |  | using System; | 
 |  |  | using HDL_ON.DriverLayer; | 
 |  |  | using HDL_ON.Entity; | 
 |  |  | using HDL_ON.Stan; | 
 |  |  | using HDL_ON.UI.CSS; | 
 |  |  | using Shared; | 
 |  |  |  | 
 |  |  | namespace HDL_ON.UI | 
 |  |  | { | 
 |  |  |     public class FhControlPage : DeviceFunctionCardCommonForm | 
 |  |  |     { | 
 |  |  |         #region ■ 变量声明___________________________ | 
 |  |  |         /// <summary> | 
 |  |  |         /// 空调温度控制控件 | 
 |  |  |         /// </summary> | 
 |  |  |         DiyArcSeekBar arcBar; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 减号按钮 | 
 |  |  |         /// </summary> | 
 |  |  |         Button btnMinus; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 加号按钮 | 
 |  |  |         /// </summary> | 
 |  |  |         Button btnPlus; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 温度按钮 | 
 |  |  |         /// </summary> | 
 |  |  |         Button btnTemp; | 
 |  |  |         Button btnTempUint; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 室内温度按钮 | 
 |  |  |         /// </summary> | 
 |  |  |         Button btnIndoorTemp; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 模式按钮 | 
 |  |  |         /// </summary> | 
 |  |  |         Button btnMode; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 开关按钮 | 
 |  |  |         /// </summary> | 
 |  |  |         Button btnSwitch; | 
 |  |  |  | 
 |  |  |         FloorHeating fhTemp = new FloorHeating(); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region ■ 初始化_____________________________ | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 初始化白色区域的内容 | 
 |  |  |         /// </summary> | 
 |  |  |         public override void InitFrameWhiteContent() | 
 |  |  |         { | 
 |  |  |  | 
 |  |  |             base.ShowColltionButton = false; | 
 |  |  |             base.SetTitleText(Language.StringByID(StringId.Electric)); | 
 |  |  |  | 
 |  |  |             //初始化第一个索引页的内容 | 
 |  |  |             this.InitFrameWhiteContent1(); | 
 |  |  |  | 
 |  |  |             //刷新界面状态 | 
 |  |  |             this.RefreshFormStatu(); | 
 |  |  |             //读取状态 | 
 |  |  |             new System.Threading.Thread(() => | 
 |  |  |             { | 
 |  |  |                 Control.Ins.SendReadCommand(device); | 
 |  |  |             }) | 
 |  |  |             { IsBackground = true }.Start(); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 初始化第一个索引页的内容 | 
 |  |  |         /// </summary> | 
 |  |  |         private void InitFrameWhiteContent1() | 
 |  |  |         { | 
 |  |  |  | 
 |  |  |             arcBar = new DiyArcSeekBar() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 OpenAngle = 160, | 
 |  |  |                 //ThumbImagePath = device.trait_on_off.curValue.ToString() == "on" ? "FunctionIcon/FloorHeating/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png", | 
 |  |  |                 ThumbImageHeight = Application.GetRealWidth(50), | 
 |  |  |                 ProgressBarColor = CSS_Color.AuxiliaryColor1, // 0xFFFC9C04, | 
 |  |  |                 OfflineProgressBarColor = CSS_Color.PromptingColor2, | 
 |  |  |                 MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min, | 
 |  |  |                 MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max, | 
 |  |  |                 ArcColor = CSS_Color.BackgroundColor, | 
 |  |  |                 Progress = Convert.ToInt32(device.GetAttrState(FunctionAttributeKey.SetTemp)), | 
 |  |  | #if __IOS__ | 
 |  |  |                 Y = Application.GetRealHeight(120 + 25), | 
 |  |  |                 Width = Application.GetRealWidth(260 - 40), | 
 |  |  |                 Height = Application.GetRealWidth(260 - 40), | 
 |  |  |                 SeekBarPadding = Application.GetRealWidth(8), | 
 |  |  | #else | 
 |  |  |                 Y = Application.GetRealHeight(120 + 40), | 
 |  |  |                 Width = Application.GetRealWidth(260 - 40), | 
 |  |  |                 Height = Application.GetRealWidth(260 - 40), | 
 |  |  |                 SeekBarPadding = Application.GetRealWidth(7), | 
 |  |  | #endif | 
 |  |  |  | 
 |  |  |             }; | 
 |  |  |             FrameWhiteCentet1.AddChidren(arcBar); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |             arcBar.ThumbImagePath = device.GetAttrState(FunctionAttributeKey.OnOff) == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png"; | 
 |  |  |             arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off"; | 
 |  |  |             arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min; | 
 |  |  |             arcBar.MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max; | 
 |  |  |             arcBar.Progress = Convert.ToInt32(device.GetAttrState(FunctionAttributeKey.SetTemp)); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |             btnTemp = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(200), | 
 |  |  |                 Width = Application.GetRealWidth(80), | 
 |  |  |                 Height = Application.GetRealWidth(60), | 
 |  |  |                 TextColor = CSS_Color.FirstLevelTitleColor, | 
 |  |  |                 TextSize = 56, | 
 |  |  |                 IsBold = true, | 
 |  |  |                 Text = device.GetAttrState(FunctionAttributeKey.SetTemp), | 
 |  |  |                 TextAlignment = TextAlignment.Center, | 
 |  |  |             }; | 
 |  |  |             FrameWhiteCentet1.AddChidren(btnTemp); | 
 |  |  |  | 
 |  |  |             btnTempUint = new Button() | 
 |  |  |             { | 
 |  |  |                 X = btnTemp.Right, | 
 |  |  |                 Y = btnTemp.Y, | 
 |  |  |                 Width = Application.GetRealWidth(30), | 
 |  |  |                 Height = Application.GetRealWidth(25), | 
 |  |  |                 TextColor = CSS_Color.FirstLevelTitleColor, | 
 |  |  |                 TextSize = CSS_FontSize.EmphasisFontSize_Secondary, | 
 |  |  |                 IsBold = true, | 
 |  |  |                 TextAlignment = TextAlignment.CenterLeft, | 
 |  |  |                 Text = fhTemp.GetTempUnitString(device) | 
 |  |  |             }; | 
 |  |  |             FrameWhiteCentet1.AddChidren(btnTempUint); | 
 |  |  |  | 
 |  |  |             btnIndoorTemp = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = btnTemp.Bottom + Application.GetRealWidth(10), | 
 |  |  |                 Width = Application.GetRealWidth(100), | 
 |  |  |                 Height = Application.GetRealHeight(20), | 
 |  |  |                 Text = Language.StringByID(StringId.IndoorTemp) + "20°C", | 
 |  |  |                 TextColor = CSS_Color.PromptingColor1, | 
 |  |  |                 TextSize = CSS_FontSize.PromptFontSize_FirstLevel, | 
 |  |  |             }; | 
 |  |  |             FrameWhiteCentet1.AddChidren(btnIndoorTemp); | 
 |  |  |  | 
 |  |  |             btnMinus = new Button() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(21), | 
 |  |  |                 Y = Application.GetRealHeight(263), | 
 |  |  |                 Width = Application.GetRealWidth(32), | 
 |  |  |                 Height = Application.GetRealWidth(32), | 
 |  |  |                 UnSelectedImagePath = "Public/MinusSignIcon.png", | 
 |  |  |             }; | 
 |  |  |             FrameWhiteCentet1.AddChidren(btnMinus); | 
 |  |  |  | 
 |  |  |             btnPlus = new Button() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(275), | 
 |  |  |                 Y = Application.GetRealHeight(263), | 
 |  |  |                 Width = Application.GetRealWidth(32), | 
 |  |  |                 Height = Application.GetRealWidth(32), | 
 |  |  |                 UnSelectedImagePath = "Public/PlusSignIcon.png", | 
 |  |  |             }; | 
 |  |  |             FrameWhiteCentet1.AddChidren(btnPlus); | 
 |  |  |  | 
 |  |  |             if (device.GetAttribute(FunctionAttributeKey.Mode) != null) | 
 |  |  |             { | 
 |  |  |                 btnMode = new Button() | 
 |  |  |                 { | 
 |  |  |                     X = Application.GetRealWidth(235), | 
 |  |  |                     Y = Application.GetRealHeight(337), | 
 |  |  |                     Width = Application.GetRealWidth(30), | 
 |  |  |                     Height = Application.GetRealWidth(30), | 
 |  |  |                     UnSelectedImagePath = fhTemp.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)) | 
 |  |  |                 }; | 
 |  |  |                 FrameWhiteCentet1.AddChidren(btnMode); | 
 |  |  |  | 
 |  |  |                 btnMode.MouseUpEventHandler = (sender, e) => | 
 |  |  |                 { | 
 |  |  |                     LoadDiv_ChangeModeView(); | 
 |  |  |                 }; | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             btnSwitch = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(466), | 
 |  |  |                 Width = Application.GetRealWidth(32), | 
 |  |  |                 Height = Application.GetRealWidth(32), | 
 |  |  |                 UnSelectedImagePath = "Public/PowerClose.png", | 
 |  |  |                 SelectedImagePath = "Public/PowerOpen.png", | 
 |  |  |                 IsSelected = device.trait_on_off.curValue.ToString() == "on" | 
 |  |  |             }; | 
 |  |  |             FrameWhiteCentet1.AddChidren(btnSwitch); | 
 |  |  |  | 
 |  |  |             LoadEvent_TempChange(); | 
 |  |  |             LoadEvent_AcStatesChange(); | 
 |  |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 加载修改模式区域 | 
 |  |  |         /// </summary> | 
 |  |  |         void LoadDiv_ChangeModeView() | 
 |  |  |         { | 
 |  |  |             Dialog dialog = new Dialog(); | 
 |  |  |  | 
 |  |  |             FrameLayout dialogView = new FrameLayout() | 
 |  |  |             { | 
 |  |  |                 BackgroundColor = CSS_Color.DialogTransparentColor1, | 
 |  |  |             }; | 
 |  |  |             dialog.AddChidren(dialogView); | 
 |  |  |  | 
 |  |  |             FrameLayout modeChangeView; | 
 |  |  |             modeChangeView = new FrameLayout() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(30), | 
 |  |  |                 Y = Application.GetRealHeight(128), | 
 |  |  |                 Width = Application.GetRealWidth(160), | 
 |  |  |                 Height = Application.GetRealHeight(287), | 
 |  |  |                 BackgroundImagePath = "FunctionIcon/AC/DivBg1.png", | 
 |  |  |             }; | 
 |  |  |             dialogView.AddChidren(modeChangeView); | 
 |  |  |  | 
 |  |  |             Button btnTitle; | 
 |  |  |             btnTitle = new Button() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(8 + 16), | 
 |  |  |                 Y = Application.GetRealHeight(8), | 
 |  |  |                 Width = Application.GetRealWidth(112), | 
 |  |  |                 Height = Application.GetRealHeight(44), | 
 |  |  |                 TextID = StringId.ChooseMode, | 
 |  |  |                 TextAlignment = TextAlignment.CenterLeft, | 
 |  |  |                 TextColor = CSS_Color.FirstLevelTitleColor, | 
 |  |  |                 TextSize = CSS_FontSize.EmphasisFontSize_Secondary, | 
 |  |  |             }; | 
 |  |  |             modeChangeView.AddChidren(btnTitle); | 
 |  |  |  | 
 |  |  |             Button btnLine = new Button() | 
 |  |  |             { | 
 |  |  |                 X = btnTitle.X, | 
 |  |  |                 Y = btnTitle.Bottom, | 
 |  |  |                 Width = Application.GetRealWidth(112), | 
 |  |  |                 Height = Application.GetRealHeight(1), | 
 |  |  |                 BackgroundColor = CSS_Color.BackgroundColor, | 
 |  |  |             }; | 
 |  |  |             modeChangeView.AddChidren(btnLine); | 
 |  |  |  | 
 |  |  |             var modeList = device.GetAttribute(FunctionAttributeKey.Mode).value; | 
 |  |  |             foreach (var m in modeList) | 
 |  |  |             { | 
 |  |  |                 Button btnModeIcon = new Button() | 
 |  |  |                 { | 
 |  |  |                     X = btnTitle.X, | 
 |  |  |                     Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 10 + 8), | 
 |  |  |                     Width = Application.GetRealWidth(24), | 
 |  |  |                     Height = Application.GetRealWidth(24), | 
 |  |  |                     IsSelected = device.GetAttrState(FunctionAttributeKey.Mode) == m, | 
 |  |  |                 }; | 
 |  |  |                 modeChangeView.AddChidren(btnModeIcon); | 
 |  |  |  | 
 |  |  |                 Button btnModeText = new Button() | 
 |  |  |                 { | 
 |  |  |                     X = Application.GetRealWidth(12) + btnModeIcon.Right, | 
 |  |  |                     Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 8), | 
 |  |  |                     Height = Application.GetRealHeight(44), | 
 |  |  |                     Width = Application.GetRealWidth(90), | 
 |  |  |                     TextAlignment = TextAlignment.CenterLeft, | 
 |  |  |                     TextColor = CSS_Color.FirstLevelTitleColor, | 
 |  |  |                     SelectedTextColor = CSS_Color.MainColor, | 
 |  |  |                     IsSelected = device.GetAttrState(FunctionAttributeKey.Mode) == m, | 
 |  |  |                     TextSize = CSS_FontSize.TextFontSize, | 
 |  |  |                 }; | 
 |  |  |                 modeChangeView.AddChidren(btnModeText); | 
 |  |  |  | 
 |  |  |                 btnModeIcon.UnSelectedImagePath = fhTemp.GetModeIconPath(m, false); | 
 |  |  |                 btnModeIcon.SelectedImagePath = fhTemp.GetModeIconPath(m); | 
 |  |  |                 btnModeText.Text = fhTemp.GetModeAttrText(m); | 
 |  |  |  | 
 |  |  |                 if (modeList.IndexOf(m) < modeList.Count - 1) | 
 |  |  |                 { | 
 |  |  |                     modeChangeView.AddChidren(new Button() | 
 |  |  |                     { | 
 |  |  |                         X = btnTitle.X, | 
 |  |  |                         Y = btnModeText.Bottom, | 
 |  |  |                         Width = Application.GetRealWidth(112), | 
 |  |  |                         Height = Application.GetRealHeight(1), | 
 |  |  |                         BackgroundColor = CSS_Color.BackgroundColor, | 
 |  |  |                     }); | 
 |  |  |                 } | 
 |  |  |                 EventHandler<MouseEventArgs> eventHandler = (sender, e) => | 
 |  |  |                 { | 
 |  |  |                     dialog.Close(); | 
 |  |  |                 }; | 
 |  |  |                 EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => | 
 |  |  |                 { | 
 |  |  |                     btnModeIcon.IsSelected = btnModeText.IsSelected = true; | 
 |  |  |                     device.SetAttrState(FunctionAttributeKey.Mode, m); | 
 |  |  |                     btnMode.UnSelectedImagePath = fhTemp.GetModeIconPath(m); | 
 |  |  |                     System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); | 
 |  |  |                     btnMode.UnSelectedImagePath = btnModeIcon.UnSelectedImagePath; | 
 |  |  |                     d.Add(FunctionAttributeKey.Mode, m); | 
 |  |  |                     Control.Ins.SendWriteCommand(device, d); | 
 |  |  |                     dialog.Close(); | 
 |  |  |                     if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") | 
 |  |  |                     { | 
 |  |  |                         arcBar.IsClickable = false; | 
 |  |  |                     } | 
 |  |  |                     else | 
 |  |  |                     { | 
 |  |  |                         arcBar.IsClickable = true; | 
 |  |  |                     } | 
 |  |  |                 }; | 
 |  |  |                 btnModeIcon.MouseUpEventHandler = eventHandler1; | 
 |  |  |                 btnModeText.MouseUpEventHandler = eventHandler1; | 
 |  |  |                 dialogView.MouseUpEventHandler = eventHandler; | 
 |  |  |  | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             dialogView.MouseUpEventHandler = (sender, e) => { | 
 |  |  |                 dialog.Close(); | 
 |  |  |             }; | 
 |  |  |             dialog.Show(); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region ■ 设备状态反馈_______________________ | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 设备状态反馈 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="i_LocalDevice"></param> | 
 |  |  |         public override void DeviceStatuPush(Function i_LocalDevice) | 
 |  |  |         { | 
 |  |  |             //不是同一个东西 | 
 |  |  |             if (this.device.sid != i_LocalDevice.sid) { return; } | 
 |  |  |  | 
 |  |  |             //刷新界面状态 | 
 |  |  |             this.RefreshFormStatu(); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region ■ 发送各种命令_______________________ | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 温度改变模式 | 
 |  |  |         /// </summary> | 
 |  |  |         void LoadEvent_TempChange() | 
 |  |  |         { | 
 |  |  |             btnMinus.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan") | 
 |  |  |                 { | 
 |  |  |                     return; | 
 |  |  |                 } | 
 |  |  |                 var temp = Convert.ToInt32(device.GetAttrState(FunctionAttributeKey.SetTemp)); | 
 |  |  |                 if (temp <= device.GetAttribute(FunctionAttributeKey.Mode).min) | 
 |  |  |                 { | 
 |  |  |                     return; | 
 |  |  |                 } | 
 |  |  |                 temp--; | 
 |  |  |                 arcBar.Progress = temp; | 
 |  |  |                 btnTemp.Text = temp.ToString(); | 
 |  |  |                 device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); | 
 |  |  |                 System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); | 
 |  |  |                 d.Add(FunctionAttributeKey.SetTemp, temp.ToString()); | 
 |  |  |                 Control.Ins.SendWriteCommand(device, d); | 
 |  |  |             }; | 
 |  |  |             btnPlus.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan") | 
 |  |  |                 { | 
 |  |  |                     return; | 
 |  |  |                 } | 
 |  |  |                 var temp = Convert.ToInt32(device.GetAttrState(FunctionAttributeKey.SetTemp)); | 
 |  |  |                 if (temp >= device.GetAttribute(FunctionAttributeKey.SetTemp).max) | 
 |  |  |                 { | 
 |  |  |                     return; | 
 |  |  |                 } | 
 |  |  |                 temp++; | 
 |  |  |                 arcBar.Progress = temp; | 
 |  |  |                 btnTemp.Text = temp.ToString(); | 
 |  |  |                 device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); | 
 |  |  |                 System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); | 
 |  |  |                 d.Add(FunctionAttributeKey.SetTemp, temp.ToString()); | 
 |  |  |                 Control.Ins.SendWriteCommand(device, d); | 
 |  |  |             }; | 
 |  |  |             arcBar.OnStopTrackingTouchEvent = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString()); | 
 |  |  |                 btnTemp.Text = arcBar.Progress.ToString(); | 
 |  |  |                 System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); | 
 |  |  |                 d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString()); | 
 |  |  |                 Control.Ins.SendWriteCommand(device, d); | 
 |  |  |             }; | 
 |  |  |             arcBar.OnProgressChangedEvent = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString()); | 
 |  |  |                 btnTemp.Text = e.ToString(); | 
 |  |  |             }; | 
 |  |  |         } | 
 |  |  |         /// <summary> | 
 |  |  |         /// 控制模式事件 | 
 |  |  |         /// </summary> | 
 |  |  |         void LoadEvent_AcStatesChange() | 
 |  |  |         { | 
 |  |  |             btnMode.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 if (device.trait_on_off.curValue.ToString() == "off") | 
 |  |  |                 { | 
 |  |  |                     return; | 
 |  |  |                 } | 
 |  |  |                 LoadDiv_ChangeModeView(); | 
 |  |  |             }; | 
 |  |  |  | 
 |  |  |             btnSwitch.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 btnSwitch.IsSelected = !btnSwitch.IsSelected; | 
 |  |  |                 device.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off"; | 
 |  |  |                 if (device.trait_on_off.curValue.ToString() == "on") | 
 |  |  |                 { | 
 |  |  |                     arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png"; | 
 |  |  |                     btnSwitch.IsSelected = true; | 
 |  |  |                     arcBar.IsOffline = false; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; | 
 |  |  |                     btnSwitch.IsBold = false; | 
 |  |  |                     arcBar.IsOffline = true; | 
 |  |  |                 } | 
 |  |  |                 System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); | 
 |  |  |                 d.Add(FunctionAttributeKey.OnOff, device.trait_on_off.curValue.ToString()); | 
 |  |  |                 Control.Ins.SendWriteCommand(device, d); | 
 |  |  |             }; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region ■ 刷新界面状态_______________________ | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 刷新界面状态 | 
 |  |  |         /// </summary> | 
 |  |  |         private void RefreshFormStatu() | 
 |  |  |         { | 
 |  |  |             Application.RunOnMainThread(() => | 
 |  |  |             { | 
 |  |  |                 btnTemp.Text = device.GetAttrState(FunctionAttributeKey.SetTemp); | 
 |  |  |                 btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.IndoorTemp))) + "°C"; | 
 |  |  |                 btnMode.UnSelectedImagePath = fhTemp.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)); | 
 |  |  |                 arcBar.Progress = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp))); | 
 |  |  |                 if (device.trait_on_off.curValue.ToString() == "on") | 
 |  |  |                 { | 
 |  |  |                     arcBar.IsOffline = false; | 
 |  |  |                     btnSwitch.IsSelected = true; | 
 |  |  |                     arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png"; | 
 |  |  |                     if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") | 
 |  |  |                     { | 
 |  |  |                         arcBar.IsClickable = false; | 
 |  |  |                     } | 
 |  |  |                     else | 
 |  |  |                     { | 
 |  |  |                         arcBar.IsClickable = true; | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     arcBar.IsOffline = true; | 
 |  |  |                     btnSwitch.IsSelected = false; | 
 |  |  |                     arcBar.IsClickable = false; | 
 |  |  |                     arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; | 
 |  |  |                 } | 
 |  |  |             }); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         #endregion | 
 |  |  |     } | 
 |  |  | } | 
 
| New file | 
 |  |  | 
 |  |  | using System; | 
 |  |  | using HDL_ON.DriverLayer; | 
 |  |  | using HDL_ON.Entity; | 
 |  |  | using HDL_ON.Stan; | 
 |  |  | using HDL_ON.UI.CSS; | 
 |  |  | using Shared; | 
 |  |  |  | 
 |  |  | namespace HDL_ON.UI | 
 |  |  | { | 
 |  |  |     public class TvControlPage : DeviceFunctionCardCommonForm | 
 |  |  |     { | 
 |  |  |         #region ■ 变量声明___________________________ | 
 |  |  |  | 
 |  |  |         Button btnChangeTVAV; | 
 |  |  |         FrameLayout topMenuView; | 
 |  |  |         Button btnTopMenuUp; | 
 |  |  |         Button btnTopMenuLeft; | 
 |  |  |         Button btnTopMenuRight; | 
 |  |  |         Button btnTopMenuDown; | 
 |  |  |         Button btnOk; | 
 |  |  |         FrameLayout channleView; | 
 |  |  |         Button btnChlReduce; | 
 |  |  |         Button btnChlPlus; | 
 |  |  |         FrameLayout volView; | 
 |  |  |         Button btnVolReduce; | 
 |  |  |         Button btnVolPlus; | 
 |  |  |         Button btnBack; | 
 |  |  |         Button btnMenu; | 
 |  |  |         Button btn123; | 
 |  |  |         Button btnMute; | 
 |  |  |         Button btnPower; | 
 |  |  |  | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 初始化白色区域的内容 | 
 |  |  |         /// </summary> | 
 |  |  |         public override void InitFrameWhiteContent() | 
 |  |  |         { | 
 |  |  |  | 
 |  |  |             base.ShowColltionButton = false; | 
 |  |  |             base.SetTitleText(Language.StringByID(StringId.Electric)); | 
 |  |  |  | 
 |  |  |             //初始化第一个索引页的内容 | 
 |  |  |             this.InitFrameWhiteContent1(); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 初始化第一个索引页的内容 | 
 |  |  |         /// </summary> | 
 |  |  |         private void InitFrameWhiteContent1() | 
 |  |  |         { | 
 |  |  |             FrameLayout controlView = new FrameLayout() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(88), | 
 |  |  |                 Width = Application.GetRealWidth(327), | 
 |  |  |                 Height = Application.GetRealHeight(526), | 
 |  |  |                 BackgroundImagePath = "Public/Fragmentbg.png", | 
 |  |  |             }; | 
 |  |  |             this.AddChidren(controlView); | 
 |  |  |  | 
 |  |  |             btnChangeTVAV = new Button() | 
 |  |  |             { | 
 |  |  |                 Y = Application.GetRealHeight(8), | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Width = Application.GetRealWidth(78), | 
 |  |  |                 Height = Application.GetRealHeight(49), | 
 |  |  |                 Text = "TV/AV", | 
 |  |  |                 TextAlignment = TextAlignment.Center, | 
 |  |  |                 TextColor = CSS_Color.MainColor, | 
 |  |  |                 TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel, | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(btnChangeTVAV); | 
 |  |  |  | 
 |  |  |             #region 轮盘控制区域 | 
 |  |  |             topMenuView = new FrameLayout() | 
 |  |  |             { | 
 |  |  |                 Y = Application.GetRealHeight(88), | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Width = Application.GetRealWidth(199), | 
 |  |  |                 Height = Application.GetRealWidth(199), | 
 |  |  |                 BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png", | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(topMenuView); | 
 |  |  |  | 
 |  |  |             btnTopMenuUp = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Width = Application.GetRealWidth(80), | 
 |  |  |                 Height = Application.GetRealWidth(50), | 
 |  |  |             }; | 
 |  |  |             topMenuView.AddChidren(btnTopMenuUp); | 
 |  |  |  | 
 |  |  |             btnTopMenuLeft = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterVertical, | 
 |  |  |                 Width = Application.GetRealWidth(50), | 
 |  |  |                 Height = Application.GetRealWidth(80), | 
 |  |  |             }; | 
 |  |  |             topMenuView.AddChidren(btnTopMenuLeft); | 
 |  |  |  | 
 |  |  |             btnTopMenuRight = new Button() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(150), | 
 |  |  |                 Gravity = Gravity.CenterVertical, | 
 |  |  |                 Width = Application.GetRealWidth(50), | 
 |  |  |                 Height = Application.GetRealWidth(80), | 
 |  |  |             }; | 
 |  |  |             topMenuView.AddChidren(btnTopMenuRight); | 
 |  |  |  | 
 |  |  |             btnTopMenuDown = new Button() | 
 |  |  |             { | 
 |  |  |                 Y = Application.GetRealWidth(150), | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Width = Application.GetRealWidth(80), | 
 |  |  |                 Height = Application.GetRealWidth(50), | 
 |  |  |             }; | 
 |  |  |             topMenuView.AddChidren(btnTopMenuDown); | 
 |  |  |  | 
 |  |  |             btnOk = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.Center, | 
 |  |  |                 Width = Application.GetRealWidth(100), | 
 |  |  |                 Height = Application.GetRealWidth(100), | 
 |  |  |             }; | 
 |  |  |             topMenuView.AddChidren(btnOk); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |             #endregion | 
 |  |  |  | 
 |  |  |  | 
 |  |  |             #region 频道音量调节 | 
 |  |  |             channleView = new FrameLayout() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(26), | 
 |  |  |                 Y = Application.GetRealHeight(246), | 
 |  |  |                 Width = Application.GetRealWidth(44), | 
 |  |  |                 Height = Application.GetRealHeight(102), | 
 |  |  |                 BackgroundImagePath = "FunctionIcon/Electrical/TV/MenuBgIcon.png", | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(channleView); | 
 |  |  |  | 
 |  |  |             btnChlReduce = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(10), | 
 |  |  |                 Width = Application.GetRealWidth(24), | 
 |  |  |                 Height = Application.GetRealWidth(24), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png" | 
 |  |  |             }; | 
 |  |  |             channleView.AddChidren(btnChlReduce); | 
 |  |  |  | 
 |  |  |             Button btnChlText; | 
 |  |  |             btnChlText = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterVertical, | 
 |  |  |                 Height = Application.GetRealWidth(23), | 
 |  |  |                 TextAlignment = TextAlignment.Center, | 
 |  |  |                 TextSize = CSS_FontSize.PromptFontSize_FirstLevel, | 
 |  |  |                 TextColor = CSS_Color.FirstLevelTitleColor, | 
 |  |  |                 TextID = StringId.Chl, | 
 |  |  |             }; | 
 |  |  |             channleView.AddChidren(btnChlText); | 
 |  |  |  | 
 |  |  |             btnChlPlus = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(66), | 
 |  |  |                 Width = Application.GetRealWidth(24), | 
 |  |  |                 Height = Application.GetRealWidth(24), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/ReduceIcon.png" | 
 |  |  |             }; | 
 |  |  |             channleView.AddChidren(btnChlPlus); | 
 |  |  |  | 
 |  |  |             volView = new FrameLayout() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(257), | 
 |  |  |                 Y = Application.GetRealHeight(246), | 
 |  |  |                 Width = Application.GetRealWidth(44), | 
 |  |  |                 Height = Application.GetRealHeight(102), | 
 |  |  |                 BackgroundImagePath = "FunctionIcon/Electrical/TV/MenuBgIcon.png", | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(volView); | 
 |  |  |  | 
 |  |  |             btnVolReduce = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(10), | 
 |  |  |                 Width = Application.GetRealWidth(24), | 
 |  |  |                 Height = Application.GetRealWidth(24), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png" | 
 |  |  |             }; | 
 |  |  |             volView.AddChidren(btnVolReduce); | 
 |  |  |  | 
 |  |  |             Button btnVolText; | 
 |  |  |             btnVolText = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterVertical, | 
 |  |  |                 Height = Application.GetRealWidth(23), | 
 |  |  |                 TextAlignment = TextAlignment.Center, | 
 |  |  |                 TextSize = CSS_FontSize.PromptFontSize_FirstLevel, | 
 |  |  |                 TextColor = CSS_Color.FirstLevelTitleColor, | 
 |  |  |                 TextID = StringId.Vol, | 
 |  |  |             }; | 
 |  |  |             volView.AddChidren(btnVolText); | 
 |  |  |  | 
 |  |  |             btnVolPlus = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(66), | 
 |  |  |                 Width = Application.GetRealWidth(24), | 
 |  |  |                 Height = Application.GetRealWidth(24), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/ReduceIcon.png" | 
 |  |  |             }; | 
 |  |  |             volView.AddChidren(btnVolPlus); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |             #endregion | 
 |  |  |  | 
 |  |  |             #region 底部控制区域 | 
 |  |  |             btnBack = new Button() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(30), | 
 |  |  |                 Y = Application.GetRealHeight(386), | 
 |  |  |                 Width = Application.GetRealWidth(40), | 
 |  |  |                 Height = Application.GetRealWidth(40), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVBackIcon.png", | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(btnBack); | 
 |  |  |  | 
 |  |  |             btnMenu = new Button() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(106), | 
 |  |  |                 Y = Application.GetRealHeight(386), | 
 |  |  |                 Width = Application.GetRealWidth(40), | 
 |  |  |                 Height = Application.GetRealWidth(40), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVMenuIcon.png", | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(btnMenu); | 
 |  |  |  | 
 |  |  |             btn123 = new Button() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(182), | 
 |  |  |                 Y = Application.GetRealHeight(386), | 
 |  |  |                 Width = Application.GetRealWidth(40), | 
 |  |  |                 Height = Application.GetRealWidth(40), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/TV123Icon.png", | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(btn123); | 
 |  |  |  | 
 |  |  |             btnMute = new Button() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(258), | 
 |  |  |                 Y = Application.GetRealHeight(386), | 
 |  |  |                 Width = Application.GetRealWidth(40), | 
 |  |  |                 Height = Application.GetRealWidth(40), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVMuteIcon.png", | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(btnMute); | 
 |  |  |  | 
 |  |  |             btnPower = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(462), | 
 |  |  |                 Width = Application.GetRealWidth(40), | 
 |  |  |                 Height = Application.GetRealWidth(40), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVPowerIcon.png", | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(btnPower); | 
 |  |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  | using Shared; | 
 |  |  | using HDL_ON.UI.CSS; | 
 |  |  | using HDL_ON.Entity; | 
 |  |  | using System.Collections.Generic; | 
 |  |  | using HDL_ON.DriverLayer; | 
 |  |  |  | 
 |  |  | namespace HDL_ON.UI | 
 |  |  | { | 
 |  |  |     public partial class TVPage : FrameLayout | 
 |  |  | 
 |  |  |             { | 
 |  |  |                 Y = Application.GetRealHeight(8), | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Width = Application.GetRealWidth(78), | 
 |  |  |                 Width = Application.GetRealWidth(90), | 
 |  |  |                 Height = Application.GetRealHeight(49), | 
 |  |  |                 Text = "TV/AV", | 
 |  |  |                 TextAlignment = TextAlignment.Center, | 
 |  |  | 
 |  |  |                 X = Application.GetRealWidth(26), | 
 |  |  |                 Y = Application.GetRealHeight(246), | 
 |  |  |                 Width = Application.GetRealWidth(44), | 
 |  |  |                 Height = Application.GetRealHeight(102), | 
 |  |  |                 Height = Application.GetRealWidth(102), | 
 |  |  |                 BackgroundImagePath = "FunctionIcon/Electrical/TV/MenuBgIcon.png", | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(channleView); | 
 |  |  |  | 
 |  |  |             btnChlReduce = new Button() | 
 |  |  |             btnChlPlus = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(10), | 
 |  |  | 
 |  |  |                 Height = Application.GetRealWidth(24), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png" | 
 |  |  |             }; | 
 |  |  |             channleView.AddChidren(btnChlReduce); | 
 |  |  |             channleView.AddChidren(btnChlPlus); | 
 |  |  |  | 
 |  |  |             Button btnChlText; | 
 |  |  |             btnChlText = new Button() | 
 |  |  | 
 |  |  |             }; | 
 |  |  |             channleView.AddChidren(btnChlText); | 
 |  |  |  | 
 |  |  |             btnChlPlus = new Button() | 
 |  |  |             btnChlReduce = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(66), | 
 |  |  |                 Y = Application.GetRealWidth(66), | 
 |  |  |                 Width = Application.GetRealWidth(24), | 
 |  |  |                 Height = Application.GetRealWidth(24), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/ReduceIcon.png" | 
 |  |  |             }; | 
 |  |  |             channleView.AddChidren(btnChlPlus); | 
 |  |  |             channleView.AddChidren(btnChlReduce); | 
 |  |  |  | 
 |  |  |             volView = new FrameLayout() | 
 |  |  |             { | 
 |  |  |                 X = Application.GetRealWidth(257), | 
 |  |  |                 Y = Application.GetRealHeight(246), | 
 |  |  |                 Width = Application.GetRealWidth(44), | 
 |  |  |                 Height = Application.GetRealHeight(102), | 
 |  |  |                 Height = Application.GetRealWidth(102), | 
 |  |  |                 BackgroundImagePath = "FunctionIcon/Electrical/TV/MenuBgIcon.png", | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(volView); | 
 |  |  |  | 
 |  |  |             btnVolReduce = new Button() | 
 |  |  |             btnVolPlus = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(10), | 
 |  |  | 
 |  |  |                 Height = Application.GetRealWidth(24), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png" | 
 |  |  |             }; | 
 |  |  |             volView.AddChidren(btnVolReduce); | 
 |  |  |             volView.AddChidren(btnVolPlus); | 
 |  |  |  | 
 |  |  |             Button btnVolText; | 
 |  |  |             btnVolText = new Button() | 
 |  |  | 
 |  |  |             }; | 
 |  |  |             volView.AddChidren(btnVolText); | 
 |  |  |  | 
 |  |  |             btnVolPlus = new Button() | 
 |  |  |             btnVolReduce = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = Application.GetRealHeight(66), | 
 |  |  |                 Y = Application.GetRealWidth(66), | 
 |  |  |                 Width = Application.GetRealWidth(24), | 
 |  |  |                 Height = Application.GetRealWidth(24), | 
 |  |  |                 UnSelectedImagePath = "FunctionIcon/Electrical/TV/ReduceIcon.png" | 
 |  |  |             }; | 
 |  |  |             volView.AddChidren(btnVolPlus); | 
 |  |  |             volView.AddChidren(btnVolReduce); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | 
 |  |  |  | 
 |  |  |             for (int i = 0; i < 10; i++) | 
 |  |  |             { | 
 |  |  |  | 
 |  |  |                 Button btn = new Button() | 
 |  |  |                 { | 
 |  |  |                     Width = Application.GetRealWidth(98), | 
 |  |  | 
 |  |  |                 } | 
 |  |  |                 numberView.AddChidren(btn); | 
 |  |  |                 btn.MouseUpEventHandler = (sender, e) => { | 
 |  |  |                     string index = (sender as  Button ).Text; | 
 |  |  |                     btn.IsSelected = false; | 
 |  |  |                     tvTemp.ControlTV(i,function); | 
 |  |  |                     if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                     { | 
 |  |  |                         Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                         d.Add($"number_{index}", ""); | 
 |  |  |                         Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                     } | 
 |  |  |                     else | 
 |  |  |                     { | 
 |  |  |                         tvTemp.ControlTV(i, function); | 
 |  |  |                     } | 
 |  |  |                 }; | 
 |  |  |                 btn.MouseDownEventHandler = (sender, e) => { | 
 |  |  |                     btn.IsSelected = true; | 
 
 |  |  | 
 |  |  | using System; | 
 |  |  | using Shared; | 
 |  |  | using HDL_ON.Entity; | 
 |  |  | using HDL_ON.DriverLayer; | 
 |  |  | using System.Collections.Generic; | 
 |  |  |  | 
 |  |  | namespace HDL_ON.UI | 
 |  |  | { | 
 |  |  | 
 |  |  |         { | 
 |  |  |             btnChangeTVAV.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.AV_TV,function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("av_tv", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.AV_TV, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |             btnChlPlus.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.ChannelUp, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("ch+", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.ChannelUp, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |             btnChlReduce.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.ChannelDown, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("ch-", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.ChannelDown, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |             btnVolPlus.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.VolUp, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("volume+", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.VolUp, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |             btnVolReduce.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.VolDown, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("volume-", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.VolDown, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |             btnBack.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.Back, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("return", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.Back, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |  | 
 |  |  |             btnMenu.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.Menu, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("menu", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.Menu, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |             btn123.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  | 
 |  |  |             }; | 
 |  |  |             btnMute.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.Mute, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("mute", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.Mute, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |             btnPower.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.Power, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("on_off", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.Power, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |  | 
 |  |  |             btnTopMenuUp.MouseUpEventHandler = (sender, e) => { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.Up, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("up", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.Up, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |             btnTopMenuLeft.MouseUpEventHandler = (sender, e) => { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.Left, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("left", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.Left, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |             btnTopMenuRight.MouseUpEventHandler = (sender, e) => { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.Right, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("right", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.Right, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |             btnTopMenuDown.MouseUpEventHandler = (sender, e) => { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.Down, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("down", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.Down, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |             btnOk.MouseUpEventHandler = (sender, e) => { | 
 |  |  |                 tvTemp.ControlTV(InfraredCode_TV.Confrim, function); | 
 |  |  |                 if (DB_ResidenceData.Instance.GatewayType == 1) | 
 |  |  |                 { | 
 |  |  |                     Dictionary<string, string> d = new Dictionary<string, string>(); | 
 |  |  |                     d.Add("ok", ""); | 
 |  |  |                     Control.Ins.SendWriteCommand(function, d); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     tvTemp.ControlTV(InfraredCode_TV.Confrim, function); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |         } | 
 |  |  |  | 
 
 |  |  | 
 |  |  |                 Y = Application.GetRealHeight(337), | 
 |  |  |                 Width = Application.GetRealWidth(30), | 
 |  |  |                 Height = Application.GetRealWidth(30), | 
 |  |  |                 UnSelectedImagePath = fhTemp.GetModeImage(function) | 
 |  |  |                 UnSelectedImagePath = fhTemp.GetModeIconPath(function.GetAttrState(FunctionAttributeKey.Mode)) | 
 |  |  |             }; | 
 |  |  |             controlView.AddChidren(btnMode); | 
 |  |  |  | 
 
 |  |  | 
 |  |  |                     } | 
 |  |  |                     bodyView.btnTemp.Text = updateTemp.GetAttrState(FunctionAttributeKey.SetTemp); | 
 |  |  |                     bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.IndoorTemp))) + "°C"; | 
 |  |  |                     bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeImage(updateTemp); | 
 |  |  |                     bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode)); | 
 |  |  |                     bodyView.arcBar.Progress = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp))); | 
 |  |  |                     if (updateTemp.trait_on_off.curValue.ToString() == "on") | 
 |  |  |                     { |