.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,28 +1,42 @@ <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <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"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget." /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_Pie.cs"> <Files> <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" /> <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="6" Column="19" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" /> <File FileName="HDL_ON/UI/MainPage.cs" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" /> <File FileName="HDL_ON/UI/UI0-Public/PublicAssmebly.cs" /> <File FileName="HDL_ON/DAL/Server/IMessageCommon.cs" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_Pie.cs" Line="34" Column="1" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="HDL_APP_Project" expanded="True"> <Node name="HDL_ON" expanded="True"> <Node name="Common" expanded="True" /> <Node name="DAL" expanded="True"> <Node name="DriverLayer" expanded="True" /> <Node name="Server" expanded="True" /> </Node> <Node name="Entity" expanded="True"> <Node name="Device" expanded="True" /> <Node name="Function" expanded="True" /> <Node name="ResponseEntity" expanded="True" /> </Node> <Node name="UI" expanded="True"> <Node name="CSS" expanded="True" /> <Node name="UI0-Public" expanded="True" /> <Node name="UI1-Login" expanded="True" /> <Node name="UI2" expanded="True"> <Node name="1-HomePage" expanded="True" /> <Node name="2-Classification" expanded="True" /> <Node name="FuntionControlView" expanded="True"> <Node name="1ContorlPage" expanded="True"> <Node name="FhControlPage.cs" selected="True" /> <Node name="1ContorlPage" expanded="True" /> <Node name="EnvironmentalScience" expanded="True"> <Node name="EchartsOption_Pie.cs" selected="True" /> </Node> </Node> </Node> @@ -31,15 +45,17 @@ <Node name="HDL-ON_Android" expanded="True"> <Node name="Assets" expanded="True"> <Node name="Phone" expanded="True"> <Node name="Collection" expanded="True" /> <Node name="FunctionIcon" 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 name="FunctionIcon" expanded="True" /> <Node name="Public" expanded="True"> <Node name="MsgIcon" expanded="True" /> </Node> </Node> </Node> </Node> DLL/IOS/Shared.IOS.JLCountryCode.dllBinary files differ
HDL-ON_Android/Assets/Language.ini
@@ -421,6 +421,7 @@ 435=Remote control 436=Added Devices 437=Device List 438=humidity:{0}% air:{1} wind:{2} 1000=Indoor Humidity 1001=V-chip @@ -1183,6 +1184,7 @@ 435=遥控器 436=已添加功能 437=设备列表 438=湿度:{0}% 空气:{1} 风速:{2}级 1000=室内湿度 HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/TV/TVAV.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/0.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/1.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/13.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/18.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/2.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/20.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/29.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/3.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/4.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/45.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/5.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/6.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/Co2Bg.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/Co2Icon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HumidityBg.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/HumidityIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/InfoIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/LowerLimit.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/Pm25Bg.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/Pm25Icon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/TempBg.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/TempIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/TvocBg.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/TvocIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/UpperLimit.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -939,6 +939,32 @@ <AndroidAsset Include="Assets\Phone\PirIcon\4.png" /> <AndroidAsset Include="Assets\Phone\PirIcon\left.png" /> <AndroidAsset Include="Assets\Phone\PirIcon\right.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\TV\TVAV.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\TvocIcon.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\TempIcon.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\Pm25Icon.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\29.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\HumidityIcon.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\13.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\TvocBg.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\20.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\Co2Icon.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\LowerLimit.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\18.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\InfoIcon.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\4.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\Co2Bg.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\HumidityBg.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\5.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\UpperLimit.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\TempBg.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\6.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\2.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\3.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\45.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\1.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\Pm25Bg.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\0.png" /> </ItemGroup> <ItemGroup> <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" /> HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103184" android:versionName="1.1.202103184" package="com.hdl.onpro"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103191" android:versionName="1.1.202103191" package="com.hdl.onpro"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" /> <!-- 定位权限--> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> HDL-ON_Android/Resources/Resource.designer.cs
Diff too large HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -435,7 +435,6 @@ <Folder Include="Resources\Phone\FunctionIcon\Electrical\" /> <Folder Include="Resources\Phone\FunctionIcon\Socket\" /> <Folder Include="Resources\Phone\FunctionIcon\EnvironmentalScience\" /> <Folder Include="Resources\Phone\Public\AirIcon\" /> <Folder Include="Resources\Phone\PersonalCenter\ResetPassword\" /> <Folder Include="Resources\Phone\Intelligence\Gallery\" /> <Folder Include="Resources\Phone\FunctionIcon\DeviceIcon\" /> @@ -444,6 +443,7 @@ <Folder Include="Resources\Phone\FunctionIcon\Electrical\WaterValve\" /> <Folder Include="Resources\Phone\FunctionIcon\ArmSensor\" /> <Folder Include="Resources\Phone\FunctionIcon\Electrical\ClothesHanger\" /> <Folder Include="Resources\Phone\FunctionIcon\EnvirSensor\" /> </ItemGroup> <ItemGroup> <InterfaceDefinition Include="LaunchScreen.storyboard" /> @@ -669,18 +669,6 @@ <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\DiagramIconOn.png" /> <BundleResource Include="Resources\Phone\Public\MsgIcon\LoadingIcon.png" /> <BundleResource Include="Resources\Phone\Collection\NoCollectionBg.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\0.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\1.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\13.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\18.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\2.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\20.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\29.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\3.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\4.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\45.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\5.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\6.png" /> <BundleResource Include="Resources\Phone\MusicIcon\bluetooth.png" /> <BundleResource Include="Resources\Phone\MusicIcon\addMusic1.png" /> <BundleResource Include="Resources\Phone\MusicIcon\prve1Selected.png" /> @@ -1161,12 +1149,49 @@ <BundleResource Include="Resources\Phone\PirIcon\succeed.png" /> <BundleResource Include="Resources\Phone\VideoIcon\hangup.png" /> <BundleResource Include="Resources\Phone\VideoIcon\danyuanji.png" /> <BundleResource Include="Resources\Phone\VideoIcon\.DS_Store" /> <BundleResource Include="Resources\Phone\VideoIcon\weiqiangji.png" /> <BundleResource Include="Resources\Phone\VideoIcon\keshiduijiang.png" /> <BundleResource Include="Resources\Phone\VideoIcon\phone.png" /> <BundleResource Include="Resources\Phone\VideoIcon\menjin.png" /> <BundleResource Include="Resources\Phone\VideoIcon\answer.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\TV\TVAV.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\Co2Bg.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\HumidityBg.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\Pm25Bg.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\TempBg.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\TvocBg.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\29.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\13.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\20.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\18.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\4.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\5.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\6.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\2.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\3.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\45.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\1.png" /> <BundleResource Include="Resources\Phone\Public\AirIcon\0.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\0.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\1.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\2.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\3.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\4.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\5.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\6.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\13.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\18.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\20.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\29.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\45.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\LowerLimit.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\UpperLimit.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\Co2Icon.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\HumidityIcon.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\InfoIcon.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\Pm25Icon.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\TempIcon.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\TvocIcon.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> HDL-ON_iOS/Other/JLCountrycode.cs
@@ -1,5 +1,7 @@ using System; using Shared.IOS.JLCountryCode; using Foundation; using System.Collections.Generic; namespace JLCountrycode { @@ -40,5 +42,60 @@ Shared.Application.currentVC.NavigationController.PushViewController(mJLCountryCodeController, true); } /// <summary> /// 选择 /// </summary> /// <param name="titleStr"></param> /// <param name="dic"></param> /// <param name="action"></param> public void ShowSortSelection(string titleStr, Dictionary<string, List<string>> dic, Action<string> action) { try { JLSortSelectionViewController vc = new JLSortSelectionViewController(); vc.TitleStr = titleStr; vc.SortedNameDict = ConvertToNativeDictionary(dic); vc.SortSelectionBlock += (countryName) => { action?.Invoke(countryName); }; Shared.Application.currentVC.NavigationController.PushViewController(vc, true); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } /// <summary> /// Dictionary 转 iOS原生 NSMutableDictionary /// </summary> /// <param name="dict"></param> /// <returns></returns> NSMutableDictionary ConvertToNativeDictionary(Dictionary<string, List<string>> dict) { NSMutableDictionary newDictionary = new NSMutableDictionary(); try { //var dictDataList = new NSMutableArray(); foreach (string key in dict.Keys) { var value = dict[key]; newDictionary.Add(new NSString(key), NSArray.FromObjects(value.ToArray())); } } catch (Exception Ex) { Console.WriteLine(Ex.ToString()); } return newDictionary; } } } HDL-ON_iOS/Resources/Language.ini
@@ -421,6 +421,7 @@ 435=Remote control 436=Added Devices 437=Device List 438=humidity:{0}% air:{1} wind:{2} 1000=Indoor Humidity 1001=V-chip @@ -1183,6 +1184,7 @@ 435=遥控器 436=已添加功能 437=设备列表 438=湿度:{0}% 空气:{1} 风速:{2}级 1000=室内湿度 HDL-ON_iOS/Resources/Phone/FunctionIcon/.DS_StoreBinary files differ
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/TV/TVAV.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/0.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/1.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/13.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/18.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/2.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/20.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/29.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/3.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/4.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/45.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/5.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/6.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/Co2Bg.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/Co2Icon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HumidityBg.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/HumidityIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/InfoIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/LowerLimit.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/Pm25Bg.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/Pm25Icon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/TempBg.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/TempIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/TvocBg.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/TvocIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/UpperLimit.png
HDL_ON/Common/R.cs
@@ -4,6 +4,7 @@ { public static class StringId { public const int EnvirSensorValueTip = 438; public const int DeviceList = 437; public const int AddedDevice = 436; public const int RemoteControl = 435; HDL_ON/DAL/DriverLayer/Control.cs
@@ -810,7 +810,7 @@ case SPK.SensorTVOC: case SPK.SensorTemperature: case SPK.SensorHumidity: EnvironmentalSciencePage.LoadEvent_UpdataStatus(localFunction); EnvironmentalPage.LoadEvent_UpdataStatus(localFunction); break; case SPK.ElectricSocket: SocketPage.UpdataState(localFunction); HDL_ON/DAL/DriverLayer/Packet.cs
@@ -504,7 +504,7 @@ sensor.SetAttrState(FunctionAttributeKey.Value, Convert.ToInt32(receiveBytes[24] * 256 + receiveBytes[25]).ToString()); break; } EnvironmentalSciencePage.LoadEvent_UpdataStatus(sensor); EnvironmentalPage.LoadEvent_UpdataStatus(sensor); } } } @@ -561,7 +561,7 @@ } break; } EnvironmentalSciencePage.LoadEvent_UpdataStatus(sensor); EnvironmentalPage.LoadEvent_UpdataStatus(sensor); } } } HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@ /// 固定域名,正式环境 /// 公共域名就近解析 /// </summary> //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; /// <summary> /// RegionMark /// </summary> HDL_ON/DAL/Server/IMessageCommon.cs
@@ -243,7 +243,7 @@ /// <param name="statuCode"></param> /// <param name="isTipStyle"></param> /// <param name="tipStr">补充的错误提示</param> public void ShowErrorInfoAlter(string statuCode, bool isTipStyle = true, int closeTime = 2, string tipStr = "") public void ShowErrorInfoAlter(string statuCode, bool isTipStyle = true, int closeTime = 2, string tipStr = "",bool showAllMsg = true) { try { @@ -258,7 +258,13 @@ if (mes == null) return; if (!string.IsNullOrEmpty(tipStr)) { mes = tipStr + "\n" + mes; if (showAllMsg) { mes = tipStr + "\n" + mes; }else { mes = tipStr; } } if (isTipStyle) { HDL_ON/Entity/ResponseEntity/CityInfo.cs
@@ -57,7 +57,7 @@ public string windDir; //"UpdateTime": "0001-01-01T00:00:00", public string aqi; public string air_Quality; public string air_Quality = "--"; public string pm10; public string pm25 = "--"; public string no2; HDL_ON/HDL_ON.projitems
@@ -385,6 +385,8 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\FrameLayout50.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\FrameLayout60.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\ShowDialog.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\EnvironmentalScience\EnvironmentalPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\EnvironmentalScience\EchartsOption_Pie.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)DAL\" /> HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@ /// <summary> /// 版本号 /// </summary> public static string VersionString = "1.1.0318"; public static string VersionString = "1.1.0319"; ///// <summary> ///// 客户端类型 ///// </summary> HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -728,7 +728,7 @@ btnName.TextID = StringId.EnvironmentalData; btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { var skipView = new EnvironmentalSciencePage(); var skipView = new EnvironmentalPage();// EnvironmentalSciencePage(); MainPage.BasePageView.AddChidren(skipView); skipView.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs
@@ -124,18 +124,7 @@ controlView.AddChidren(btnCollection); } btnChangeTVAV = new Button() { Y = Application.GetRealHeight(8), Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(90), 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() @@ -287,28 +276,28 @@ #region 底部控制区域 btnBack = new Button() { X = Application.GetRealWidth(30), Y = Application.GetRealHeight(386), Width = Application.GetRealWidth(40), Height = Application.GetRealWidth(40), X = Application.GetRealWidth(52), Y = Application.GetRealHeight(402), Width = Application.GetRealWidth(32), Height = Application.GetRealWidth(32), UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVBackIcon.png", }; controlView.AddChidren(btnBack); btnMenu = new Button() btnChangeTVAV = new Button() { X = Application.GetRealWidth(106), Y = Application.GetRealHeight(386), Width = Application.GetRealWidth(40), Height = Application.GetRealWidth(40), UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVMenuIcon.png", X = Application.GetRealWidth(116), Y = Application.GetRealHeight(402), Width = Application.GetRealWidth(32), Height = Application.GetRealWidth(32), UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVAV.png", }; controlView.AddChidren(btnMenu); controlView.AddChidren(btnChangeTVAV); btn123 = new Button() { X = Application.GetRealWidth(182), Y = Application.GetRealHeight(386), X = Application.GetRealWidth(180), Y = Application.GetRealHeight(402), Width = Application.GetRealWidth(40), Height = Application.GetRealWidth(40), UnSelectedImagePath = "FunctionIcon/Electrical/TV/TV123Icon.png", @@ -317,20 +306,30 @@ btnMute = new Button() { X = Application.GetRealWidth(258), Y = Application.GetRealHeight(386), Width = Application.GetRealWidth(40), Height = Application.GetRealWidth(40), X = Application.GetRealWidth(244), Y = Application.GetRealHeight(402), Width = Application.GetRealWidth(32), Height = Application.GetRealWidth(32), UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVMuteIcon.png", }; controlView.AddChidren(btnMute); btnMenu = new Button() { X = Application.GetRealWidth(116), Y = Application.GetRealHeight(466), Width = Application.GetRealWidth(32), Height = Application.GetRealWidth(32), UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVMenuIcon.png", }; controlView.AddChidren(btnMenu); btnPower = new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(462), Width = Application.GetRealWidth(40), Height = Application.GetRealWidth(40), X = Application.GetRealWidth(180), Y = Application.GetRealHeight(466), Width = Application.GetRealWidth(32), Height = Application.GetRealWidth(32), UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVPowerIcon.png", }; controlView.AddChidren(btnPower); HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_Pie.cs
New file @@ -0,0 +1,36 @@ using System; using System.Collections.Generic; namespace HDL_ON.UI { /// <summary> /// 饼图 /// </summary> public class EchartsOption_Pie { public string name = ""; public string type = "pie"; public string radius = "55%"; public List<OpthionData> data = new List<OpthionData>(); public string itemStyle = ""; public EchartsOption_Pie() { } } public class OpthionData { public int value = 0; public string name = ""; } public class ItemStyle { } } HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
New file @@ -0,0 +1,933 @@ using System; using System.Collections.Generic; using HDL_ON.DriverLayer; using HDL_ON.Entity; using HDL_ON.UI.CSS; using Shared; namespace HDL_ON.UI { public class EnvironmentalPage : FrameLayout { #region 控件集合 static EnvironmentalPage bodyView; /// <summary> /// 楼层显示 /// </summary> Button btnRoom; /// <summary> /// 房间选择下拉图标 /// </summary> Button btnFoorDownIcon; /// <summary> /// 房间选择触发区域 /// </summary> Button btnRoomClickRow; /// <summary> /// 传感器列表区域 /// </summary> FrameLayout sensorListView; /// <summary> /// 天气名称文本 /// </summary> Button btnWatherText; /// <summary> /// 湿度数据文本 /// </summary> Button btnHumidityText; /// <summary> /// pm25数据文本 /// </summary> Button btnPm25Values; /// <summary> /// 风速数据文本 /// </summary> Button btnFanSpeedValues; #endregion #region 区域变量 Room room; Sensor sensorTemp = new Sensor(); #endregion public EnvironmentalPage() { bodyView = this; } /// <summary> /// 加载界面 /// </summary> /// <param name="btnCollectionIcon">收藏按钮</param> /// <param name="btnFunctionName">功能名称信息按钮</param> /// <param name="btnFromFloor">功能楼层信息按钮</param> public void LoadPage() { bodyView.BackgroundColor = CSS_Color.BackgroundColor; #region 顶部天气部分 var topWeatherView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(73), Width = Application.GetRealWidth(361), Height = Application.GetRealWidth(166), BackgroundImagePath = "FunctionIcon/EnvirSensor/0.png", }; bodyView.AddChidren(topWeatherView); LoadEvent_ChangeWeatherIcon(topWeatherView); var btnLocationText = new Button() { X = Application.GetRealWidth(27), Width = Application.GetRealWidth(74), Height = Application.GetRealWidth(44), TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, TextColor = CSS_Color.FirstLevelTitleColor, Text = MainPage.cityInfo.location, }; topWeatherView.AddChidren(btnLocationText); var btnTemp = new Button() { X = Application.GetRealWidth(21), Y = Application.GetRealWidth(53), Width = Application.GetRealWidth(78), Height = Application.GetRealWidth(68), TextSize = 60, IsBold = true, TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, Text = MainPage.cityInfo.temperature, }; topWeatherView.AddChidren(btnTemp); var btnTempUint = new Button() { X = Application.GetRealWidth(109), Y = Application.GetRealWidth(60), Width = Application.GetRealWidth(20), Height = Application.GetRealWidth(20), TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextColor = CSS_Color.TextualColor, Text = "°C", }; topWeatherView.AddChidren(btnTempUint); btnWatherText = new Button() { X = Application.GetRealWidth(109), Y = Application.GetRealWidth(82), Width = Application.GetRealWidth(200), Height = Application.GetRealWidth(20), TextColor = CSS_Color.TextualColor, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.CenterLeft, Text = MainPage.cityInfo.weather }; topWeatherView.AddChidren(btnWatherText); var btnTempUpperLimit = new Button() { X = Application.GetRealWidth(107), Y = Application.GetRealWidth(101), Width = Application.GetRealWidth(16), Height = Application.GetRealWidth(16), UnSelectedImagePath = "FunctionIcon/EnvirSensor/UpperLimit.png", }; topWeatherView.AddChidren(btnTempUpperLimit); var btnTempUpperLimitText = new Button() { X = btnTempUpperLimit.Right, Y = Application.GetRealWidth(101), Width = Application.GetRealWidth(42), Height = Application.GetRealWidth(20), TextColor = CSS_Color.TextualColor, TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = "10°C", }; topWeatherView.AddChidren(btnTempUpperLimitText); var btnTempLowerLimit = new Button() { X = Application.GetRealWidth(156), Y = Application.GetRealWidth(101), Width = Application.GetRealWidth(16), Height = Application.GetRealWidth(16), UnSelectedImagePath = "FunctionIcon/EnvirSensor/LowerLimit.png", }; topWeatherView.AddChidren(btnTempLowerLimit); var btnTempLowerLimitText = new Button() { X = btnTempLowerLimit.Right, Y = Application.GetRealWidth(101), Width = Application.GetRealWidth(42), Height = Application.GetRealWidth(20), TextColor = CSS_Color.TextualColor, TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = "2°C", }; topWeatherView.AddChidren(btnTempLowerLimitText); var btnValue = new Button() { X = Application.GetRealWidth(27), Y = Application.GetRealWidth(119), Width = Application.GetRealWidth(300), Height = Application.GetRealWidth(34), TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, TextColor = CSS_Color.TextualColor, }; topWeatherView.AddChidren(btnValue); var valueText = Language.StringByID(StringId.EnvirSensorValueTip); btnValue.Text = valueText.Replace("{0}", $"{MainPage.cityInfo.humidity}").Replace("{1}", $"{MainPage.cityInfo.pm25}").Replace("{2}", $"{MainPage.cityInfo.windLevel}"); #endregion #region contentView FrameLayout contentView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealWidth(239), Height = Application.GetRealHeight(450), }; bodyView.AddChidren(contentView); #region 房间顶部切换显示区域 room = new Room() { roomName = Language.StringByID(StringId.All) }; btnFoorDownIcon = new Button() { Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), X = Application.GetRealWidth(16), Y = Application.GetRealHeight(18), UnSelectedImagePath = "Public/DownIcon.png", }; contentView.AddChidren(btnFoorDownIcon); btnRoom = new Button() { X = btnFoorDownIcon.Right, Y = Application.GetRealHeight(18), Width = Application.GetRealWidth(200), Height = Application.GetMinRealAverage(16), TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextAlignment = TextAlignment.CenterLeft, Text = room.roomName, }; contentView.AddChidren(btnRoom); btnRoomClickRow = new Button() { Height = Application.GetRealHeight(40), }; contentView.AddChidren(btnRoomClickRow); #endregion sensorListView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(50), Height = Application.GetRealHeight(456), Radius = (uint)Application.GetRealWidth(12), BorderColor = 0x00000000, BorderWidth = 0, }; contentView.AddChidren(sensorListView); LoadSenesorList(); #endregion //LoadEventList(); LoadDialog_ChangeRoom(); new TopViewDiv(bodyView, Language.StringByID(StringId.EnvironmentalScience)).LoadTopView(); } /// <summary> /// 加载传感器列表 /// </summary> void LoadSenesorList() { sensorListView.RemoveAll(); int index = 0; foreach (var sensor in FunctionList.List.GetEnvirSensorsList()) { LoadSensorDiv(sensor, index); index++; } } /// <summary> /// 加载传感器列表 /// </summary> void LoadSensorDiv(Function sensor, int index) { var levelColorList = sensorTemp.GetLevelColorList(sensor.spk); var levelTextList = sensorTemp.GetLevelTextList(sensor.spk); if (room.roomId == "" || sensor.roomIds.Contains(room.roomId)) { var sensorTag = sensor.sid; FrameLayout sensorView = new FrameLayout() { X = Application.GetRealWidth(7), Width = Application.GetRealWidth(182), Height = Application.GetRealWidth(124), Y = Application.GetRealWidth(124 * (index / 2)), Tag = sensorTag }; var imagePath = ""; var iconPath = ""; switch (sensor.spk) { case SPK.SensorCO2: imagePath = "FunctionIcon/EnvirSensor/Co2Bg.png"; iconPath = "FunctionIcon/EnvirSensor/Co2Icon.png"; break; case SPK.SensorPm25: imagePath = "FunctionIcon/EnvirSensor/Pm25Bg.png"; iconPath = "FunctionIcon/EnvirSensor/Pm25Icon.png"; break; case SPK.SensorTVOC: imagePath = "FunctionIcon/EnvirSensor/TvocBg.png"; iconPath = "FunctionIcon/EnvirSensor/TvocIcon.png"; break; case SPK.SensorHumidity: imagePath = "FunctionIcon/EnvirSensor/HumidityBg.png"; iconPath = "FunctionIcon/EnvirSensor/HumidityIcon.png"; break; case SPK.SensorTemperature: imagePath = "FunctionIcon/EnvirSensor/TempBg.png"; iconPath = "FunctionIcon/EnvirSensor/TempIcon.png"; break; } sensorView.BackgroundImagePath = imagePath; if (index % 2 != 0) { sensorView.X = Application.GetRealWidth(189); } sensorListView.AddChidren(sensorView); var btnIcon = new Button() { X = Application.GetRealWidth(23), Y = Application.GetRealHeight(17), Width = Application.GetRealWidth(32), Height = Application.GetRealWidth(32), UnSelectedImagePath = iconPath }; sensorView.AddChidren(btnIcon); btnIcon.MouseUpEventHandler = (sender, e) => { #region var esp = new EnvironmentalSensorPage(sensor); MainPage.BasePageView.AddChidren(esp); esp.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; #endregion }; var btnInfoIcon = new Button() { X = Application.GetRealWidth(139), Y = Application.GetRealHeight(21), Width = Application.GetRealWidth(24), Height = Application.GetRealWidth(24), UnSelectedImagePath = "FunctionIcon/EnvirSensor/InfoIcon.png", }; sensorView.AddChidren(btnInfoIcon); btnInfoIcon.MouseUpEventHandler = (sender, e) => { LoadInfo(sensor); }; var btnLevel = new Button() { X = Application.GetRealWidth(25), Y = Application.GetRealWidth(59), Width = Application.GetRealWidth(100), Height = Application.GetRealWidth(32), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor,//levelColorList[sensorTemp.GetCurLevel(sensor) - 1], TextSize = CSS_FontSize.SubheadingFontSize, TextID = levelTextList[sensorTemp.GetCurLevel(sensor) - 1], Tag = "SensorLevel", }; sensorView.AddChidren(btnLevel); btnLevel.MouseUpEventHandler = (sender, e) => { #region var esp = new EnvironmentalSensorPage(sensor); MainPage.BasePageView.AddChidren(esp); esp.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; #endregion }; var btnSensorValues = new Button() { X = Application.GetRealWidth(25), Y = Application.GetRealWidth(83), Width = Application.GetRealWidth(100), Height = Application.GetRealWidth(27), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, IsBold = true, Text = sensor.GetAttrState(FunctionAttributeKey.Value), Tag = "SensorValues" }; sensorView.AddChidren(btnSensorValues); btnSensorValues.MouseUpEventHandler = (sender, e) => { #region var esp = new EnvironmentalSensorPage(sensor); MainPage.BasePageView.AddChidren(esp); esp.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; #endregion }; //btnLevel.MouseUpEventHandler = (sender, e) => //{ // LoadInfo(sensor); //}; new System.Threading.Thread(() => { Control.Ins.SendReadCommand(sensor); }) { IsBackground = true }.Start(); } } /// <summary> /// 加载传感器等级相关信息 /// </summary> void LoadInfo(Function sensor) { var levelColorList = sensorTemp.GetLevelColorList(sensor.spk); var levelTextList = sensorTemp.GetLevelTextList(sensor.spk); Dialog dialog = new Dialog(); FrameLayout dialogBodyView = new FrameLayout(); dialog.AddChidren(dialogBodyView); dialogBodyView.MouseUpEventHandler = (sender, e) => { dialog.Close(); }; VerticalScrolViewLayout infoView = new VerticalScrolViewLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(667 - 94 - (levelColorList.Count * 44) - 20), Width = Application.GetRealWidth(343), Height = Application.GetRealHeight(94 + (levelColorList.Count * 44) + levelColorList.Count), Radius = (uint)Application.GetRealWidth(12), BackgroundColor = CSS_Color.MainBackgroundColor, Animate = Animate.DownToUp, ScrollEnabled = false, AnimateSpeed = 0.3f, }; dialogBodyView.AddChidren(infoView); Button btnTitle = new Button() { Height = Application.GetRealHeight(50), TextColor = CSS_Color.FirstLevelTitleColor, IsBold = true, TextSize = CSS_FontSize.SubheadingFontSize, TextAlignment = TextAlignment.Center, }; infoView.AddChidren(btnTitle); switch (sensor.spk) { case SPK.SensorPm25: btnTitle.Text = "PM2.5(ug/m²)"; break; case SPK.SensorTemperature: btnTitle.Text = Language.StringByID(StringId.Temp) + "(°C)"; break; case SPK.SensorTVOC: btnTitle.Text = "TVOC(PPM)"; break; case SPK.SensorCO2: btnTitle.Text = "CO2(PPM)"; break; case SPK.SensorHumidity: btnTitle.Text = Language.StringByID(StringId.Humidity) + "(%)"; break; } FrameLayout subTitleView = new FrameLayout() { Height = Application.GetRealHeight(44), }; infoView.AddChidren(subTitleView); subTitleView.AddChidren(new Button() { X = Application.GetRealWidth(20), Width = Application.GetRealWidth(100), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, TextID = StringId.IntervalValue, }); subTitleView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(100), TextAlignment = TextAlignment.Center, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, TextID = StringId.LevelSensor, }); subTitleView.AddChidren(new Button() { X = Application.GetRealWidth(223), Width = Application.GetRealWidth(100), TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, TextID = StringId.ColorValue, }); for (int index = 0; index < levelTextList.Count; index++) { infoView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(303), Height = Application.GetRealWidth(1), BackgroundColor = CSS_Color.DividingLineColor, }); FrameLayout subInfoView = new FrameLayout() { Height = Application.GetRealHeight(44), }; infoView.AddChidren(subInfoView); subInfoView.AddChidren(new Button() { X = Application.GetRealWidth(20), Width = Application.GetRealWidth(100), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, Text = sensorTemp.GetIntervalValue(sensor.spk)[index] }); subInfoView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(100), TextAlignment = TextAlignment.Center, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, TextID = levelTextList[index] }); subInfoView.AddChidren(new Button() { X = Application.GetRealWidth(285), Gravity = Gravity.CenterVertical, Width = Application.GetRealWidth(38), Height = Application.GetRealHeight(18), Radius = (uint)Application.GetRealWidth(4), BackgroundColor = levelColorList[index] }); } dialog.Show(); } /// <summary> /// 房间列表点击事件 /// </summary> void LoadDialog_ChangeRoom() { EventHandler<MouseEventArgs> eventHandler = (sender, e) => { var dialog = new Dialog(); var dialogBody = new FrameLayout(); dialog.AddChidren(dialogBody); dialogBody.MouseUpEventHandler += (sender1, e1) => { dialog.Close(); }; var dispalyView = new FrameLayout() { X = Application.GetRealWidth(10), Y = Application.GetRealHeight(266), Width = Application.GetRealWidth(160), Height = Application.GetRealHeight(110), BackgroundImagePath = "PersonalCenter/HomeList1bg.png", }; dialogBody.AddChidren(dispalyView); var contentView = new VerticalScrolViewLayout() { X = Application.GetRealWidth(8), Y = Application.GetRealHeight(15), Width = Application.GetRealWidth(150), Height = Application.GetRealHeight(45 * 2), ScrollEnabled = false }; dispalyView.AddChidren(contentView); if (SpatialInfo.CurrentSpatial.RoomList.Count < 2) { } else if (SpatialInfo.CurrentSpatial.RoomList.Count < 3) { dispalyView = new FrameLayout() { X = Application.GetRealWidth(10), Y = Application.GetRealHeight(266), Width = Application.GetRealWidth(160), Height = Application.GetRealHeight(155), BackgroundImagePath = "PersonalCenter/HomeList2bg.png", }; dialogBody.AddChidren(dispalyView); contentView.Height = Application.GetRealHeight(45 * 3); dispalyView.AddChidren(contentView); } else if (SpatialInfo.CurrentSpatial.RoomList.Count < 4) { dispalyView = new FrameLayout() { X = Application.GetRealWidth(10), Y = Application.GetRealHeight(266), Width = Application.GetRealWidth(160), Height = Application.GetRealHeight(200), BackgroundImagePath = "PersonalCenter/HomeList3bg.png", }; dialogBody.AddChidren(dispalyView); contentView.Height = Application.GetRealHeight(45 * 4); dispalyView.AddChidren(contentView); } else { dispalyView = new FrameLayout() { X = Application.GetRealWidth(10), Y = Application.GetRealHeight(266), Width = Application.GetRealWidth(160), Height = Application.GetRealHeight(245), BackgroundImagePath = "PersonalCenter/HomeList4bg.png", }; dialogBody.AddChidren(dispalyView); contentView.Height = Application.GetRealHeight(45 * 5); contentView.ScrollEnabled = true; dispalyView.AddChidren(contentView); } var showListRoom = new List<Room>(); showListRoom.Add(new Room() { roomName = Language.StringByID(StringId.All) }); showListRoom.AddRange(SpatialInfo.CurrentSpatial.RoomList); foreach (var roomTemp in showListRoom) { string roomName = roomTemp.roomName; var btnRoomName = new Button() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(112), Height = Application.GetRealHeight(44), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, SelectedTextColor = CSS_Color.MainColor, Text = roomName, TextSize = CSS_FontSize.SubheadingFontSize, IsSelected = btnRoom.Text == roomName, IsMoreLines = true, Tag = roomName }; contentView.AddChidren(btnRoomName); btnRoomName.MouseUpEventHandler += (senderH, en) => { dialog.Close(); btnRoom.Text = roomName; room = roomTemp; LoadSenesorList(); }; } dialog.Show(); }; btnRoomClickRow.MouseUpEventHandler = eventHandler; //btnFoorDownIcon.MouseUpEventHandler = eventHandler; } #region event public static void LoadEvent_UpdataStatus(Function updateTemp) { Application.RunOnMainThread(() => { if (bodyView != null) { for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++) { var sensorTag = updateTemp.sid; var view = bodyView.sensorListView.GetChildren(i); if (view.GetType() == typeof(FrameLayout)) { if (view.Tag.ToString() != sensorTag) { continue; } for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++) { var btn = (view as FrameLayout).GetChildren(j); if (btn.GetType() == typeof(Button)) { if (btn.Tag != null) { var tag = btn.Tag.ToString(); if (tag == "SensorValues") { (btn as Button).Text = updateTemp.GetAttrState(FunctionAttributeKey.Value); } else if (tag == "SensorLevel") { (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; } } } else if (btn.GetType() == typeof(ArcSeekBar)) { (btn as ArcSeekBar).ProgressBarColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; (btn as ArcSeekBar).Progress = (96 / bodyView.sensorTemp.GetLevelColorList(updateTemp.spk).Count) * bodyView.sensorTemp.GetCurLevel(updateTemp); } } } } } }); } void LoadEvent_ChangeWeatherIcon(FrameLayout view) { switch (MainPage.cityInfo.weather) { case "晴": case "Sunny": case "晴天": case "天晴": case "Clear": case "大部晴朗": case "Mostly Sunny": case "晴時多雲": case "陽光充沛": case "Mostly Clear": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/0.png"; break; case "多云": case "Cloudy": case "多雲": case "少云": case "Partly Cloudy": case "少雲": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/1.png"; break; case "阴": case "Overcast": case "陰天": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/2.png"; break; case "阵雨": case "Showers": case "陣雨": case "驟雨": case "局部阵雨": case "Scattered Showers": case "局地陣雨": case "局部地區性驟雨": case "小阵雨": case "Light Showers": case "小陣雨": case "零散驟雨": case "强阵雨": case "Heavy Showers": case "強陣雨": case "間中有驟雨": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; break; case "阵雪": case "Snow Showers": case "陣雪": case "驟雪": case "小阵雪": case "Light Snow Showers": case "小陣雪": case "零散驟雪": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; break; case "雾": case "Fog": case "霧": case "薄霧": case "冻雾": case "Freezing Fog": case "凍霧": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/18.png"; break; case "沙尘暴": case "Sandstorm": case "沙塵暴": case "强沙尘暴": case "Heavy Sandstorm": case "強沙塵暴": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/20.png"; break; case "浮尘": case "Dust": case "浮塵": case "尘卷风": case "Dust Storm": case "塵捲風": case "扬沙": case "Sand": case "揚沙": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/29.png"; break; case "霾": case "Haze": case "煙霞": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/45.png"; break; case "雷阵雨": case "Thundershower": case "雷陣雨": case "雷雨": case "雷电": case "Lightning": case "雷電": case "雷暴": case "Thunderstorm": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/4.png"; break; case "雷阵雨伴有冰雹": case "Thundershower with Hail": case "雷陣雨伴有冰雹": case "雷雨伴有冰雹": case "冰雹": case "Hail": case "冰针": case "Needle Ice": case "冰針": case "冰粒": case "Icy": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/5.png"; break; case "雨夹雪": case "Sleet": case "雨夾雪": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/6.png"; break; case "小雨": case "Light Rain": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; break; case "中雨": case "Rain": case "小到中雨": case "雨": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; break; case "大雨": case "Heavy Rain": case "中到大雨": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; break; case "暴雨": case "Rainstorm": case "豪雨": case "大暴雨": case "Heavy Rainstorm": case "大豪雨": case "特大暴雨": case "Extreme Rainstorm": case "超大豪雨": case "大到暴雨": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/3.png"; break; case "小雪": case "Light Snow": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; break; case "雪": case "中雪": case "小到中雪": case "Snow": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; break; case "大雪": case "Heavy Snow": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; break; case "暴雪": case "Blizzard": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/13.png"; break; case "冻雨": case "Freezing Rain": case "凍雨": view.BackgroundImagePath = "FunctionIcon/EnvirSensor/6.png"; break; } } #endregion } } HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePage.cs
@@ -1,751 +1,751 @@ using System; using Shared; using HDL_ON.Entity; using HDL_ON.UI.CSS; using System.Collections.Generic; using HDL_ON.DriverLayer; //using System; //using Shared; //using HDL_ON.Entity; //using HDL_ON.UI.CSS; //using System.Collections.Generic; //using HDL_ON.DriverLayer; namespace HDL_ON.UI { public partial class EnvironmentalSciencePage : FrameLayout { //namespace HDL_ON.UI //{ // public partial class EnvironmentalSciencePage : FrameLayout // { #region 控件集合 static EnvironmentalSciencePage bodyView; /// <summary> /// 楼层显示 /// </summary> Button btnRoom; /// <summary> /// 房间选择下拉图标 /// </summary> Button btnFoorDownIcon; /// <summary> /// 房间选择触发区域 /// </summary> Button btnRoomClickRow; /// <summary> /// 传感器列表区域 /// </summary> FrameLayout sensorListView; // #region 控件集合 // static EnvironmentalSciencePage bodyView; // /// <summary> // /// 楼层显示 // /// </summary> // Button btnRoom; // /// <summary> // /// 房间选择下拉图标 // /// </summary> // Button btnFoorDownIcon; // /// <summary> // /// 房间选择触发区域 // /// </summary> // Button btnRoomClickRow; // /// <summary> // /// 传感器列表区域 // /// </summary> // FrameLayout sensorListView; /// <summary> /// 天气名称文本 /// </summary> Button btnWatherText; /// <summary> /// 湿度数据文本 /// </summary> Button btnHumidityText; /// <summary> /// pm25数据文本 /// </summary> Button btnPm25Values; /// <summary> /// 风速数据文本 /// </summary> Button btnFanSpeedValues; // /// <summary> // /// 天气名称文本 // /// </summary> // Button btnWatherText; // /// <summary> // /// 湿度数据文本 // /// </summary> // Button btnHumidityText; // /// <summary> // /// pm25数据文本 // /// </summary> // Button btnPm25Values; // /// <summary> // /// 风速数据文本 // /// </summary> // Button btnFanSpeedValues; #endregion #region 区域变量 Room room; // #endregion // #region 区域变量 // Room room; Sensor sensorTemp = new Sensor(); #endregion // Sensor sensorTemp = new Sensor(); // #endregion public EnvironmentalSciencePage() { bodyView = this; } // public EnvironmentalSciencePage() // { // bodyView = this; // } /// <summary> /// 加载界面 /// </summary> /// <param name="btnCollectionIcon">收藏按钮</param> /// <param name="btnFunctionName">功能名称信息按钮</param> /// <param name="btnFromFloor">功能楼层信息按钮</param> public void LoadPage() { bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; // /// <summary> // /// 加载界面 // /// </summary> // /// <param name="btnCollectionIcon">收藏按钮</param> // /// <param name="btnFunctionName">功能名称信息按钮</param> // /// <param name="btnFromFloor">功能楼层信息按钮</param> // public void LoadPage() // { // bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; #region 顶部天气部分 var topWeatherView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(76), Width = Application.GetRealWidth(343), Height = Application.GetRealHeight(151), BackgroundColor = CSS_Color.MainColor, Radius = (uint)Application.GetRealWidth(12), }; bodyView.AddChidren(topWeatherView); // #region 顶部天气部分 // var topWeatherView = new FrameLayout() { // Gravity = Gravity.CenterHorizontal, // Y = Application.GetRealHeight(76), // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(151), // BackgroundColor = CSS_Color.MainColor, // Radius = (uint)Application.GetRealWidth(12), // }; // bodyView.AddChidren(topWeatherView); var btnTemp = new Button() { X = Application.GetRealWidth(24), Y = Application.GetRealHeight(16), Width = Application.GetRealWidth(60), Height = Application.GetRealHeight(48), TextSize = 42, IsBold = true, TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.MainBackgroundColor, Text = MainPage.cityInfo.temperature, }; topWeatherView.AddChidren(btnTemp); // var btnTemp = new Button() // { // X = Application.GetRealWidth(24), // Y = Application.GetRealHeight(16), // Width = Application.GetRealWidth(60), // Height = Application.GetRealHeight(48), // TextSize = 42, // IsBold = true, // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.MainBackgroundColor, // Text = MainPage.cityInfo.temperature, // }; // topWeatherView.AddChidren(btnTemp); var btnTempUint = new Button() { X = Application.GetRealWidth(79), Y = Application.GetRealHeight(16), Width = Application.GetRealWidth(20), Height = Application.GetRealHeight(20), TextSize = 12, TextColor = CSS_Color.MainBackgroundColor, Text = "°C", }; topWeatherView.AddChidren(btnTempUint); // var btnTempUint = new Button() // { // X = Application.GetRealWidth(79), // Y = Application.GetRealHeight(16), // Width = Application.GetRealWidth(20), // Height = Application.GetRealHeight(20), // TextSize = 12, // TextColor = CSS_Color.MainBackgroundColor, // Text = "°C", // }; // topWeatherView.AddChidren(btnTempUint); var btnWeatherIcon = new Button() { X = Application.GetRealWidth(115), Y = Application.GetRealHeight(16), Width = Application.GetRealWidth(20), Height = Application.GetRealWidth(20), UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/SmogIcon.png", }; topWeatherView.AddChidren(btnWeatherIcon); LoadEvent_ChangeWeatherIcon(btnWeatherIcon); // var btnWeatherIcon = new Button() // { // X = Application.GetRealWidth(115), // Y = Application.GetRealHeight(16), // Width = Application.GetRealWidth(20), // Height = Application.GetRealWidth(20), // UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/SmogIcon.png", // }; // topWeatherView.AddChidren(btnWeatherIcon); // LoadEvent_ChangeWeatherIcon(btnWeatherIcon); btnWatherText = new Button() { X = Application.GetRealWidth(139), Y = Application.GetRealHeight(16), Width = Application.GetRealWidth(28 * 3), Height = Application.GetRealHeight(20), TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.CenterLeft, Text = MainPage.cityInfo.weather }; topWeatherView.AddChidren(btnWatherText); // btnWatherText = new Button() // { // X = Application.GetRealWidth(139), // Y = Application.GetRealHeight(16), // Width = Application.GetRealWidth(28 * 3), // Height = Application.GetRealHeight(20), // TextColor = CSS_Color.MainBackgroundColor, // TextSize = CSS_FontSize.TextFontSize, // TextAlignment = TextAlignment.CenterLeft, // Text = MainPage.cityInfo.weather // }; // topWeatherView.AddChidren(btnWatherText); var btnTempUpperLimit = new Button() { X = btnWeatherIcon.X, Y = Application.GetRealHeight(46), Width = Application.GetRealWidth(16), Height = Application.GetRealWidth(16), UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/UpArrow.png", }; topWeatherView.AddChidren(btnTempUpperLimit); // var btnTempUpperLimit = new Button() // { // X = btnWeatherIcon.X, // Y = Application.GetRealHeight(46), // Width = Application.GetRealWidth(16), // Height = Application.GetRealWidth(16), // UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/UpArrow.png", // }; // topWeatherView.AddChidren(btnTempUpperLimit); var btnTempUpperLimitText = new Button() { X = btnTempUpperLimit.Right, Y = Application.GetRealHeight(44), Width = Application.GetRealWidth(42), Height = Application.GetRealHeight(20), TextColor = CSS_Color.MainBackgroundColor, TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.TextFontSize, Text = "10°C", }; topWeatherView.AddChidren(btnTempUpperLimitText); // var btnTempUpperLimitText = new Button() // { // X = btnTempUpperLimit.Right, // Y = Application.GetRealHeight(44), // Width = Application.GetRealWidth(42), // Height = Application.GetRealHeight(20), // TextColor = CSS_Color.MainBackgroundColor, // TextAlignment = TextAlignment.CenterLeft, // TextSize = CSS_FontSize.TextFontSize, // Text = "10°C", // }; // topWeatherView.AddChidren(btnTempUpperLimitText); var btnTempLowerLimit = new Button() { X = btnTempUpperLimitText.Right, Y = Application.GetRealHeight(46), Width = Application.GetRealWidth(16), Height = Application.GetRealWidth(16), UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/UpArrow.png", }; btnTempLowerLimit.SetRotation(180f); topWeatherView.AddChidren(btnTempLowerLimit); // var btnTempLowerLimit = new Button() // { // X = btnTempUpperLimitText.Right, // Y = Application.GetRealHeight(46), // Width = Application.GetRealWidth(16), // Height = Application.GetRealWidth(16), // UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/UpArrow.png", // }; // btnTempLowerLimit.SetRotation(180f); // topWeatherView.AddChidren(btnTempLowerLimit); var btnTempLowerLimitText = new Button() { X = btnTempLowerLimit.Right, Y = Application.GetRealHeight(44), Width = Application.GetRealWidth(42), Height = Application.GetRealHeight(20), TextColor = CSS_Color.MainBackgroundColor, TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.TextFontSize, Text = "2°C", }; topWeatherView.AddChidren(btnTempLowerLimitText); // var btnTempLowerLimitText = new Button() // { // X = btnTempLowerLimit.Right, // Y = Application.GetRealHeight(44), // Width = Application.GetRealWidth(42), // Height = Application.GetRealHeight(20), // TextColor = CSS_Color.MainBackgroundColor, // TextAlignment = TextAlignment.CenterLeft, // TextSize = CSS_FontSize.TextFontSize, // Text = "2°C", // }; // topWeatherView.AddChidren(btnTempLowerLimitText); var btnLocationText = new Button() { X = Application.GetRealWidth(233), Y = Application.GetRealHeight(18), Width = Application.GetRealWidth(74), Height = Application.GetRealHeight(17), TextAlignment = TextAlignment.CenterRight, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextColor = CSS_Color.MainBackgroundColor, Text = MainPage.cityInfo.location, }; topWeatherView.AddChidren(btnLocationText); // var btnLocationText = new Button() // { // X = Application.GetRealWidth(233), // Y = Application.GetRealHeight(18), // Width = Application.GetRealWidth(74), // Height = Application.GetRealHeight(17), // TextAlignment = TextAlignment.CenterRight, // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, // TextColor = CSS_Color.MainBackgroundColor, // Text = MainPage.cityInfo.location, // }; // topWeatherView.AddChidren(btnLocationText); var btnLocationIcon = new Button() { X = btnLocationText.Right, Y = Application.GetRealHeight(18), Width = Application.GetRealWidth(16), Height = Application.GetRealHeight(16), UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/LocationIcon.png", }; topWeatherView.AddChidren(btnLocationIcon); // var btnLocationIcon = new Button() // { // X = btnLocationText.Right, // Y = Application.GetRealHeight(18), // Width = Application.GetRealWidth(16), // Height = Application.GetRealHeight(16), // UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/LocationIcon.png", // }; // topWeatherView.AddChidren(btnLocationIcon); Button btnHumidityIcon = new Button() { X = Application.GetRealWidth(26), Y = Application.GetRealHeight(90), Width = Application.GetRealWidth(24), Height = Application.GetRealWidth(24), UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/HumidityIcon.png", }; topWeatherView.AddChidren(btnHumidityIcon); // Button btnHumidityIcon = new Button() // { // X = Application.GetRealWidth(26), // Y = Application.GetRealHeight(90), // Width = Application.GetRealWidth(24), // Height = Application.GetRealWidth(24), // UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/HumidityIcon.png", // }; // topWeatherView.AddChidren(btnHumidityIcon); btnHumidityText = new Button() { X = Application.GetRealWidth(15), Y = btnHumidityIcon.Bottom, Width = Application.GetRealWidth(46), Height = Application.GetRealHeight(25), TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextAlignment = TextAlignment.Center, TextColor = CSS_Color.MainBackgroundColor, Text = MainPage.cityInfo.humidity + "%", }; topWeatherView.AddChidren(btnHumidityText); // btnHumidityText = new Button() // { // X = Application.GetRealWidth(15), // Y = btnHumidityIcon.Bottom, // Width = Application.GetRealWidth(46), // Height = Application.GetRealHeight(25), // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, // TextAlignment = TextAlignment.Center, // TextColor = CSS_Color.MainBackgroundColor, // Text = MainPage.cityInfo.humidity + "%", // }; // topWeatherView.AddChidren(btnHumidityText); Button btnPm25Icon = new Button() { X = Application.GetRealWidth(104), Y = Application.GetRealHeight(90), Width = Application.GetRealWidth(24), Height = Application.GetRealWidth(24), UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/Pm25Icon.png", }; topWeatherView.AddChidren(btnPm25Icon); // Button btnPm25Icon = new Button() // { // X = Application.GetRealWidth(104), // Y = Application.GetRealHeight(90), // Width = Application.GetRealWidth(24), // Height = Application.GetRealWidth(24), // UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/Pm25Icon.png", // }; // topWeatherView.AddChidren(btnPm25Icon); btnPm25Values = new Button() { X = Application.GetRealWidth(90), Y = btnHumidityIcon.Bottom, Width = Application.GetRealWidth(52), Height = Application.GetRealHeight(25), TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextAlignment = TextAlignment.Center, TextColor = CSS_Color.MainBackgroundColor, Text = MainPage.cityInfo.pm25, }; topWeatherView.AddChidren(btnPm25Values); // btnPm25Values = new Button() // { // X = Application.GetRealWidth(90), // Y = btnHumidityIcon.Bottom, // Width = Application.GetRealWidth(52), // Height = Application.GetRealHeight(25), // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, // TextAlignment = TextAlignment.Center, // TextColor = CSS_Color.MainBackgroundColor, // Text = MainPage.cityInfo.pm25, // }; // topWeatherView.AddChidren(btnPm25Values); Button btnFanSpeedIcon = new Button() { X = Application.GetRealWidth(182), Y = Application.GetRealHeight(90), Width = Application.GetRealWidth(24), Height = Application.GetRealWidth(24), UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/WeatherFanSpeedIcon.png", }; topWeatherView.AddChidren(btnFanSpeedIcon); // Button btnFanSpeedIcon = new Button() // { // X = Application.GetRealWidth(182), // Y = Application.GetRealHeight(90), // Width = Application.GetRealWidth(24), // Height = Application.GetRealWidth(24), // UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/WeatherFanSpeedIcon.png", // }; // topWeatherView.AddChidren(btnFanSpeedIcon); btnFanSpeedValues = new Button() { X = Application.GetRealWidth(162), Y = btnFanSpeedIcon.Bottom, Width = Application.GetRealWidth(63), Height = Application.GetRealHeight(25), TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextAlignment = TextAlignment.Center, TextColor = CSS_Color.MainBackgroundColor, Text = MainPage.cityInfo.windLevel, }; topWeatherView.AddChidren(btnFanSpeedValues); #endregion // btnFanSpeedValues = new Button() // { // X = Application.GetRealWidth(162), // Y = btnFanSpeedIcon.Bottom, // Width = Application.GetRealWidth(63), // Height = Application.GetRealHeight(25), // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, // TextAlignment = TextAlignment.Center, // TextColor = CSS_Color.MainBackgroundColor, // Text = MainPage.cityInfo.windLevel, // }; // topWeatherView.AddChidren(btnFanSpeedValues); // #endregion #region contentView FrameLayout contentView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(239), Width = Application.GetRealWidth(343), Height = Application.GetRealHeight(418), Radius = (uint)Application.GetRealWidth(12), BorderColor = 0x00000000, BorderWidth = 0, BackgroundColor = CSS_Color.BackgroundColor, }; bodyView.AddChidren(contentView); // #region contentView // FrameLayout contentView = new FrameLayout() // { // Gravity = Gravity.CenterHorizontal, // Y = Application.GetRealHeight(239), // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(418), // Radius = (uint)Application.GetRealWidth(12), // BorderColor = 0x00000000, // BorderWidth = 0, // BackgroundColor = CSS_Color.BackgroundColor, // }; // bodyView.AddChidren(contentView); #region 房间顶部切换显示区域 room = new Room() { roomName = Language.StringByID(StringId.All)}; btnFoorDownIcon = new Button() { Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), X = Application.GetRealWidth(16), Y = Application.GetRealHeight(18), UnSelectedImagePath = "Public/DownIcon.png", }; contentView.AddChidren(btnFoorDownIcon); // #region 房间顶部切换显示区域 // room = new Room() { roomName = Language.StringByID(StringId.All)}; // btnFoorDownIcon = new Button() // { // Width = Application.GetMinRealAverage(16), // Height = Application.GetMinRealAverage(16), // X = Application.GetRealWidth(16), // Y = Application.GetRealHeight(18), // UnSelectedImagePath = "Public/DownIcon.png", // }; // contentView.AddChidren(btnFoorDownIcon); btnRoom = new Button() { X = btnFoorDownIcon.Right, Y = Application.GetRealHeight(18), Width = Application.GetRealWidth(200), Height = Application.GetMinRealAverage(16), TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextAlignment = TextAlignment.CenterLeft, Text = room.roomName, }; contentView.AddChidren(btnRoom); // btnRoom = new Button() // { // X = btnFoorDownIcon.Right, // Y = Application.GetRealHeight(18), // Width = Application.GetRealWidth(200), // Height = Application.GetMinRealAverage(16), // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, // TextAlignment = TextAlignment.CenterLeft, // Text = room.roomName, // }; // contentView.AddChidren(btnRoom); btnRoomClickRow = new Button() { Height = Application.GetRealHeight(40), }; contentView.AddChidren(btnRoomClickRow); // btnRoomClickRow = new Button() // { // Height = Application.GetRealHeight(40), // }; // contentView.AddChidren(btnRoomClickRow); #endregion // #endregion sensorListView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(50), Width = Application.GetRealWidth(308), Height = Application.GetRealHeight(456), Radius = (uint)Application.GetRealWidth(12), BorderColor = 0x00000000, BorderWidth = 0, }; contentView.AddChidren(sensorListView); // sensorListView = new FrameLayout() // { // Gravity = Gravity.CenterHorizontal, // Y = Application.GetRealHeight(50), // Width = Application.GetRealWidth(308), // Height = Application.GetRealHeight(456), // Radius = (uint)Application.GetRealWidth(12), // BorderColor = 0x00000000, // BorderWidth = 0, // }; // contentView.AddChidren(sensorListView); LoadSenesorList(); // LoadSenesorList(); LoadEventList(); // LoadEventList(); #endregion // #endregion //LoadEventList(); LoadDialog_ChangeRoom(); // //LoadEventList(); // LoadDialog_ChangeRoom(); new TopViewDiv(bodyView, Language.StringByID(StringId.EnvironmentalScience)).LoadTopView(); // new TopViewDiv(bodyView, Language.StringByID(StringId.EnvironmentalScience)).LoadTopView(); } // } /// <summary> /// 加载传感器列表 /// </summary> void LoadSenesorList() { sensorListView.RemoveAll(); int index = 0; foreach (var sensor in FunctionList.List.GetEnvirSensorsList()) { LoadSensorDiv(sensor, index); index++; } } // /// <summary> // /// 加载传感器列表 // /// </summary> // void LoadSenesorList() // { // sensorListView.RemoveAll(); // int index = 0; // foreach (var sensor in FunctionList.List.GetEnvirSensorsList()) // { // LoadSensorDiv(sensor, index); // index++; // } // } /// <summary> /// 加载传感器列表 /// </summary> void LoadSensorDiv(Function sensor,int index) { var levelColorList = sensorTemp.GetLevelColorList(sensor.spk); var levelTextList = sensorTemp.GetLevelTextList(sensor.spk); // /// <summary> // /// 加载传感器列表 // /// </summary> // void LoadSensorDiv(Function sensor,int index) // { // var levelColorList = sensorTemp.GetLevelColorList(sensor.spk); // var levelTextList = sensorTemp.GetLevelTextList(sensor.spk); if (room.roomId == "" || sensor.roomIds.Contains(room.roomId)) { var sensorTag = sensor.sid; FrameLayout sensorView = new FrameLayout() { Width = Application.GetRealWidth(148), Height = Application.GetRealWidth(80), Radius = (uint)Application.GetRealWidth(8), BorderColor = 0x00000000, BorderWidth = 0, BackgroundColor = CSS_Color.MainBackgroundColor, Y = Application.GetRealWidth(92 * (index / 2)), Tag = sensorTag }; if (index % 2 != 0) { sensorView.X = Application.GetRealWidth(160); } sensorListView.AddChidren(sensorView); // if (room.roomId == "" || sensor.roomIds.Contains(room.roomId)) // { // var sensorTag = sensor.sid; // FrameLayout sensorView = new FrameLayout() // { // Width = Application.GetRealWidth(148), // Height = Application.GetRealWidth(80), // Radius = (uint)Application.GetRealWidth(8), // BorderColor = 0x00000000, // BorderWidth = 0, // BackgroundColor = CSS_Color.MainBackgroundColor, // Y = Application.GetRealWidth(92 * (index / 2)), // Tag = sensorTag // }; // if (index % 2 != 0) // { // sensorView.X = Application.GetRealWidth(160); // } // sensorListView.AddChidren(sensorView); var arcBar = new DiyArcSeekBar() { X = Application.GetRealWidth(7), Gravity = Gravity.CenterVertical, Width = Application.GetRealWidth(48), Height = Application.GetRealWidth(48), OpenAngle = 10, ProgressBarColor = sensorTemp.GetLevelColorList(sensor.spk)[sensorTemp.GetCurLevel(sensor) - 1], MinValue = 0, MaxValue = 96, Progress = (96 / sensorTemp.GetLevelColorList(sensor.spk).Count * sensorTemp.GetCurLevel(sensor)), IsClickable = false, ArcColor = CSS_Color.BackgroundColor, ArcWidth = Application.GetRealWidth(4), IsThumbImgBtnShow = false, SeekBarPadding = Application.GetRealWidth(2), }; sensorView.AddChidren(arcBar); // var arcBar = new DiyArcSeekBar() // { // X = Application.GetRealWidth(7), // Gravity = Gravity.CenterVertical, // Width = Application.GetRealWidth(48), // Height = Application.GetRealWidth(48), // OpenAngle = 10, // ProgressBarColor = sensorTemp.GetLevelColorList(sensor.spk)[sensorTemp.GetCurLevel(sensor) - 1], // MinValue = 0, // MaxValue = 96, // Progress = (96 / sensorTemp.GetLevelColorList(sensor.spk).Count * sensorTemp.GetCurLevel(sensor)), // IsClickable = false, // ArcColor = CSS_Color.BackgroundColor, // ArcWidth = Application.GetRealWidth(4), // IsThumbImgBtnShow = false, // SeekBarPadding = Application.GetRealWidth(2), // }; // sensorView.AddChidren(arcBar); var btnSensorTitle = new Button() { X = Application.GetRealWidth(7), Gravity = Gravity.CenterVertical, Width = Application.GetRealWidth(48), Height = Application.GetRealWidth(48), TextAlignment = TextAlignment.Center, TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, TextColor = CSS_Color.FirstLevelTitleColor, TextID = sensorTemp.GetFunctionTypeNameId(sensor.spk), Tag = "SensorTitle" }; sensorView.AddChidren(btnSensorTitle); btnSensorTitle.MouseUpEventHandler = (sender, e) => { #region var esp = new EnvironmentalSensorPage(sensor); MainPage.BasePageView.AddChidren(esp); esp.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; #endregion }; // var btnSensorTitle = new Button() // { // X = Application.GetRealWidth(7), // Gravity = Gravity.CenterVertical, // Width = Application.GetRealWidth(48), // Height = Application.GetRealWidth(48), // TextAlignment = TextAlignment.Center, // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, // TextColor = CSS_Color.FirstLevelTitleColor, // TextID = sensorTemp.GetFunctionTypeNameId(sensor.spk), // Tag = "SensorTitle" // }; // sensorView.AddChidren(btnSensorTitle); // btnSensorTitle.MouseUpEventHandler = (sender, e) => { // #region // var esp = new EnvironmentalSensorPage(sensor); // MainPage.BasePageView.AddChidren(esp); // esp.LoadPage(); // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; // #endregion // }; var btnInfoIcon = new Button() { X = Application.GetRealWidth(120), Width = Application.GetRealWidth(28), Height = Application.GetRealWidth(28), UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/TipInfoIcon.png", }; sensorView.AddChidren(btnInfoIcon); btnInfoIcon.MouseUpEventHandler = (sender, e) => { LoadInfo(sensor); }; // var btnInfoIcon = new Button() // { // X = Application.GetRealWidth(120), // Width = Application.GetRealWidth(28), // Height = Application.GetRealWidth(28), // UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/TipInfoIcon.png", // }; // sensorView.AddChidren(btnInfoIcon); // btnInfoIcon.MouseUpEventHandler = (sender, e) => // { // LoadInfo(sensor); // }; var btnSensorValues = new Button() { X = Application.GetRealWidth(72), Y = Application.GetRealWidth(17), Width = Application.GetRealWidth(70), Height = Application.GetRealWidth(30), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.EmphasisFontSize_Secondary, IsBold = true, Text = sensor.GetAttrState(FunctionAttributeKey.Value), Tag = "SensorValues" }; sensorView.AddChidren(btnSensorValues); // var btnSensorValues = new Button() // { // X = Application.GetRealWidth(72), // Y = Application.GetRealWidth(17), // Width = Application.GetRealWidth(70), // Height = Application.GetRealWidth(30), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.EmphasisFontSize_Secondary, // IsBold = true, // Text = sensor.GetAttrState(FunctionAttributeKey.Value), // Tag = "SensorValues" // }; // sensorView.AddChidren(btnSensorValues); var btnLevel = new Button() { X = Application.GetRealWidth(70), Y = btnSensorValues.Bottom, Width = Application.GetRealWidth(50), Height = Application.GetRealWidth(18), TextAlignment = TextAlignment.CenterLeft, TextColor = levelColorList[sensorTemp.GetCurLevel( sensor) - 1], TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, TextID = levelTextList[sensorTemp.GetCurLevel(sensor) - 1], Tag = "SensorLevel" }; sensorView.AddChidren(btnLevel); // var btnLevel = new Button() // { // X = Application.GetRealWidth(70), // Y = btnSensorValues.Bottom, // Width = Application.GetRealWidth(50), // Height = Application.GetRealWidth(18), // TextAlignment = TextAlignment.CenterLeft, // TextColor = levelColorList[sensorTemp.GetCurLevel( sensor) - 1], // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, // TextID = levelTextList[sensorTemp.GetCurLevel(sensor) - 1], // Tag = "SensorLevel" // }; // sensorView.AddChidren(btnLevel); Control.Ins.SendReadCommand(sensor); } } // Control.Ins.SendReadCommand(sensor); // } // } /// <summary> /// 加载传感器等级相关信息 /// </summary> void LoadInfo(Function sensor) { var levelColorList = sensorTemp.GetLevelColorList(sensor.spk); var levelTextList = sensorTemp.GetLevelTextList(sensor.spk); Dialog dialog = new Dialog(); // /// <summary> // /// 加载传感器等级相关信息 // /// </summary> // void LoadInfo(Function sensor) // { // var levelColorList = sensorTemp.GetLevelColorList(sensor.spk); // var levelTextList = sensorTemp.GetLevelTextList(sensor.spk); // Dialog dialog = new Dialog(); FrameLayout dialogBodyView = new FrameLayout(); dialog.AddChidren(dialogBodyView); dialogBodyView.MouseUpEventHandler = (sender, e) => { dialog.Close(); }; VerticalScrolViewLayout infoView = new VerticalScrolViewLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(667 - 94 - (levelColorList.Count * 44) - 20), Width = Application.GetRealWidth(343), Height = Application.GetRealHeight(94 + (levelColorList.Count * 44) + levelColorList.Count), Radius = (uint)Application.GetRealWidth(12), BackgroundColor = CSS_Color.MainBackgroundColor, Animate = Animate.DownToUp, ScrollEnabled = false, AnimateSpeed = 0.3f, }; dialogBodyView.AddChidren(infoView); // FrameLayout dialogBodyView = new FrameLayout(); // dialog.AddChidren(dialogBodyView); // dialogBodyView.MouseUpEventHandler = (sender, e) => // { // dialog.Close(); // }; // VerticalScrolViewLayout infoView = new VerticalScrolViewLayout() // { // Gravity = Gravity.CenterHorizontal, // Y = Application.GetRealHeight(667 - 94 - (levelColorList.Count * 44) - 20), // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(94 + (levelColorList.Count * 44) + levelColorList.Count), // Radius = (uint)Application.GetRealWidth(12), // BackgroundColor = CSS_Color.MainBackgroundColor, // Animate = Animate.DownToUp, // ScrollEnabled = false, // AnimateSpeed = 0.3f, // }; // dialogBodyView.AddChidren(infoView); Button btnTitle = new Button() { Height = Application.GetRealHeight(50), TextColor = CSS_Color.FirstLevelTitleColor, IsBold = true, TextSize = CSS_FontSize.SubheadingFontSize, TextAlignment = TextAlignment.Center, }; infoView.AddChidren(btnTitle); // Button btnTitle = new Button() // { // Height = Application.GetRealHeight(50), // TextColor = CSS_Color.FirstLevelTitleColor, // IsBold = true, // TextSize = CSS_FontSize.SubheadingFontSize, // TextAlignment = TextAlignment.Center, // }; // infoView.AddChidren(btnTitle); switch (sensor.spk) { case SPK.SensorPm25: btnTitle.Text = "PM2.5(ug/m²)"; break; case SPK.SensorTemperature: btnTitle.Text = Language.StringByID(StringId.Temp) + "(°C)"; break; case SPK.SensorTVOC: btnTitle.Text = "TVOC(PPM)"; break; case SPK.SensorCO2: btnTitle.Text = "CO2(PPM)"; break; case SPK.SensorHumidity: btnTitle.Text = Language.StringByID(StringId.Humidity) + "(%)"; break; } // switch (sensor.spk) // { // case SPK.SensorPm25: // btnTitle.Text = "PM2.5(ug/m²)"; // break; // case SPK.SensorTemperature: // btnTitle.Text = Language.StringByID(StringId.Temp) + "(°C)"; // break; // case SPK.SensorTVOC: // btnTitle.Text = "TVOC(PPM)"; // break; // case SPK.SensorCO2: // btnTitle.Text = "CO2(PPM)"; // break; // case SPK.SensorHumidity: // btnTitle.Text = Language.StringByID(StringId.Humidity) + "(%)"; // break; // } FrameLayout subTitleView = new FrameLayout() { Height = Application.GetRealHeight(44), }; infoView.AddChidren(subTitleView); // FrameLayout subTitleView = new FrameLayout() // { // Height = Application.GetRealHeight(44), // }; // infoView.AddChidren(subTitleView); subTitleView.AddChidren(new Button() { X = Application.GetRealWidth(20), Width = Application.GetRealWidth(100), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, TextID = StringId.IntervalValue, }); // subTitleView.AddChidren(new Button() // { // X = Application.GetRealWidth(20), // Width = Application.GetRealWidth(100), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.TextFontSize, // IsBold = true, // TextID = StringId.IntervalValue, // }); subTitleView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(100), TextAlignment = TextAlignment.Center, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, TextID = StringId.LevelSensor, }); // subTitleView.AddChidren(new Button() // { // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(100), // TextAlignment = TextAlignment.Center, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.TextFontSize, // IsBold = true, // TextID = StringId.LevelSensor, // }); subTitleView.AddChidren(new Button() { X = Application.GetRealWidth(223), Width = Application.GetRealWidth(100), TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, TextID = StringId.ColorValue, }); for (int index = 0; index < levelTextList.Count; index++) { infoView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(303), Height = Application.GetRealWidth(1), BackgroundColor = CSS_Color.DividingLineColor, }); // subTitleView.AddChidren(new Button() // { // X = Application.GetRealWidth(223), // Width = Application.GetRealWidth(100), // TextAlignment = TextAlignment.CenterRight, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.TextFontSize, // IsBold = true, // TextID = StringId.ColorValue, // }); // for (int index = 0; index < levelTextList.Count; index++) // { // infoView.AddChidren(new Button() // { // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(303), // Height = Application.GetRealWidth(1), // BackgroundColor = CSS_Color.DividingLineColor, // }); FrameLayout subInfoView = new FrameLayout() { Height = Application.GetRealHeight(44), }; infoView.AddChidren(subInfoView); // FrameLayout subInfoView = new FrameLayout() // { // Height = Application.GetRealHeight(44), // }; // infoView.AddChidren(subInfoView); subInfoView.AddChidren(new Button() { X = Application.GetRealWidth(20), Width = Application.GetRealWidth(100), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, Text = sensorTemp.GetIntervalValue(sensor.spk)[index] }); // subInfoView.AddChidren(new Button() // { // X = Application.GetRealWidth(20), // Width = Application.GetRealWidth(100), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.TextFontSize, // IsBold = true, // Text = sensorTemp.GetIntervalValue(sensor.spk)[index] // }); subInfoView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(100), TextAlignment = TextAlignment.Center, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, TextID = levelTextList[index] }); // subInfoView.AddChidren(new Button() // { // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(100), // TextAlignment = TextAlignment.Center, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.TextFontSize, // IsBold = true, // TextID = levelTextList[index] // }); subInfoView.AddChidren(new Button() { X = Application.GetRealWidth(285), Gravity = Gravity.CenterVertical, Width = Application.GetRealWidth(38), Height = Application.GetRealHeight(18), Radius = (uint)Application.GetRealWidth(4), BackgroundColor = levelColorList[index] }); } // subInfoView.AddChidren(new Button() // { // X = Application.GetRealWidth(285), // Gravity = Gravity.CenterVertical, // Width = Application.GetRealWidth(38), // Height = Application.GetRealHeight(18), // Radius = (uint)Application.GetRealWidth(4), // BackgroundColor = levelColorList[index] // }); // } dialog.Show(); } // dialog.Show(); // } /// <summary> /// 房间列表点击事件 /// </summary> void LoadDialog_ChangeRoom() { EventHandler<MouseEventArgs> eventHandler = (sender, e) => { var dialog = new Dialog(); var dialogBody = new FrameLayout(); dialog.AddChidren(dialogBody); dialogBody.MouseUpEventHandler += (sender1, e1) => { dialog.Close(); }; // /// <summary> // /// 房间列表点击事件 // /// </summary> // void LoadDialog_ChangeRoom() // { // EventHandler<MouseEventArgs> eventHandler = (sender, e) => { // var dialog = new Dialog(); // var dialogBody = new FrameLayout(); // dialog.AddChidren(dialogBody); // dialogBody.MouseUpEventHandler += (sender1, e1) => { // dialog.Close(); // }; var dispalyView = new FrameLayout() { X = Application.GetRealWidth(10), Y = Application.GetRealHeight(266), Width = Application.GetRealWidth(160), Height = Application.GetRealHeight(110), BackgroundImagePath = "PersonalCenter/HomeList1bg.png", }; dialogBody.AddChidren(dispalyView); // var dispalyView = new FrameLayout() // { // X = Application.GetRealWidth(10), // Y = Application.GetRealHeight(266), // Width = Application.GetRealWidth(160), // Height = Application.GetRealHeight(110), // BackgroundImagePath = "PersonalCenter/HomeList1bg.png", // }; // dialogBody.AddChidren(dispalyView); var contentView = new VerticalScrolViewLayout() { X = Application.GetRealWidth(8), Y = Application.GetRealHeight(15), Width = Application.GetRealWidth(150), Height = Application.GetRealHeight(45 * 2), ScrollEnabled = false }; dispalyView.AddChidren(contentView); // var contentView = new VerticalScrolViewLayout() // { // X = Application.GetRealWidth(8), // Y = Application.GetRealHeight(15), // Width = Application.GetRealWidth(150), // Height = Application.GetRealHeight(45 * 2), // ScrollEnabled = false // }; // dispalyView.AddChidren(contentView); if (SpatialInfo.CurrentSpatial.RoomList.Count < 2) { } else if (SpatialInfo.CurrentSpatial.RoomList.Count < 3) { dispalyView = new FrameLayout() { X = Application.GetRealWidth(10), Y = Application.GetRealHeight(266), Width = Application.GetRealWidth(160), Height = Application.GetRealHeight(155), BackgroundImagePath = "PersonalCenter/HomeList2bg.png", }; dialogBody.AddChidren(dispalyView); // if (SpatialInfo.CurrentSpatial.RoomList.Count < 2) // { // } // else if (SpatialInfo.CurrentSpatial.RoomList.Count < 3) // { // dispalyView = new FrameLayout() // { // X = Application.GetRealWidth(10), // Y = Application.GetRealHeight(266), // Width = Application.GetRealWidth(160), // Height = Application.GetRealHeight(155), // BackgroundImagePath = "PersonalCenter/HomeList2bg.png", // }; // dialogBody.AddChidren(dispalyView); contentView.Height = Application.GetRealHeight(45 * 3); dispalyView.AddChidren(contentView); } else if (SpatialInfo.CurrentSpatial.RoomList.Count < 4) { dispalyView = new FrameLayout() { X = Application.GetRealWidth(10), Y = Application.GetRealHeight(266), Width = Application.GetRealWidth(160), Height = Application.GetRealHeight(200), BackgroundImagePath = "PersonalCenter/HomeList3bg.png", }; dialogBody.AddChidren(dispalyView); // contentView.Height = Application.GetRealHeight(45 * 3); // dispalyView.AddChidren(contentView); // } // else if (SpatialInfo.CurrentSpatial.RoomList.Count < 4) // { // dispalyView = new FrameLayout() // { // X = Application.GetRealWidth(10), // Y = Application.GetRealHeight(266), // Width = Application.GetRealWidth(160), // Height = Application.GetRealHeight(200), // BackgroundImagePath = "PersonalCenter/HomeList3bg.png", // }; // dialogBody.AddChidren(dispalyView); contentView.Height = Application.GetRealHeight(45 * 4); dispalyView.AddChidren(contentView); } else { dispalyView = new FrameLayout() { X = Application.GetRealWidth(10), Y = Application.GetRealHeight(266), Width = Application.GetRealWidth(160), Height = Application.GetRealHeight(245), BackgroundImagePath = "PersonalCenter/HomeList4bg.png", }; dialogBody.AddChidren(dispalyView); // contentView.Height = Application.GetRealHeight(45 * 4); // dispalyView.AddChidren(contentView); // } // else // { // dispalyView = new FrameLayout() // { // X = Application.GetRealWidth(10), // Y = Application.GetRealHeight(266), // Width = Application.GetRealWidth(160), // Height = Application.GetRealHeight(245), // BackgroundImagePath = "PersonalCenter/HomeList4bg.png", // }; // dialogBody.AddChidren(dispalyView); contentView.Height = Application.GetRealHeight(45 * 5); contentView.ScrollEnabled = true; dispalyView.AddChidren(contentView); } // contentView.Height = Application.GetRealHeight(45 * 5); // contentView.ScrollEnabled = true; // dispalyView.AddChidren(contentView); // } var showListRoom = new List<Room>(); showListRoom.Add(new Room() { roomName = Language.StringByID(StringId.All) }); showListRoom.AddRange(SpatialInfo.CurrentSpatial.RoomList); // var showListRoom = new List<Room>(); // showListRoom.Add(new Room() { roomName = Language.StringByID(StringId.All) }); // showListRoom.AddRange(SpatialInfo.CurrentSpatial.RoomList); foreach (var roomTemp in showListRoom) { string roomName = roomTemp.roomName; var btnRoomName = new Button() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(112), Height = Application.GetRealHeight(44), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS.CSS_Color.FirstLevelTitleColor, SelectedTextColor = CSS.CSS_Color.MainColor, Text = roomName, TextSize = CSS.CSS_FontSize.SubheadingFontSize, IsSelected = btnRoom.Text == roomName, IsMoreLines = true, Tag = roomName }; contentView.AddChidren(btnRoomName); // foreach (var roomTemp in showListRoom) // { // string roomName = roomTemp.roomName; // var btnRoomName = new Button() // { // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(112), // Height = Application.GetRealHeight(44), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS.CSS_Color.FirstLevelTitleColor, // SelectedTextColor = CSS.CSS_Color.MainColor, // Text = roomName, // TextSize = CSS.CSS_FontSize.SubheadingFontSize, // IsSelected = btnRoom.Text == roomName, // IsMoreLines = true, // Tag = roomName // }; // contentView.AddChidren(btnRoomName); btnRoomName.MouseUpEventHandler += (senderH, en) => { dialog.Close(); btnRoom.Text = roomName; room = roomTemp; LoadSenesorList(); }; } // btnRoomName.MouseUpEventHandler += (senderH, en) => // { // dialog.Close(); // btnRoom.Text = roomName; // room = roomTemp; // LoadSenesorList(); // }; // } dialog.Show(); }; // dialog.Show(); // }; btnRoomClickRow.MouseUpEventHandler = eventHandler; //btnFoorDownIcon.MouseUpEventHandler = eventHandler; } // btnRoomClickRow.MouseUpEventHandler = eventHandler; // //btnFoorDownIcon.MouseUpEventHandler = eventHandler; // } } } // } //} HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs
@@ -1,234 +1,234 @@ using System; using HDL_ON.Entity; using Shared; namespace HDL_ON.UI { public partial class EnvironmentalSciencePage { //using System; //using HDL_ON.Entity; //using Shared; //namespace HDL_ON.UI //{ // public partial class EnvironmentalSciencePage // { void LoadEventList() { // void LoadEventList() // { } // } public static void LoadEvent_UpdataStatus(Function updateTemp) { Application.RunOnMainThread(() =>{ if (bodyView != null) { for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++) { var sensorTag = updateTemp.sid; var view = bodyView.sensorListView.GetChildren(i); if (view.GetType() == typeof(FrameLayout)) { if(view.Tag.ToString() != sensorTag) { continue; } for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++) { var btn = (view as FrameLayout).GetChildren(j); if (btn.GetType() == typeof(Button)) { if (btn.Tag!=null) { var tag = btn.Tag.ToString(); if (tag == "SensorValues") { (btn as Button).Text = updateTemp.GetAttrState(FunctionAttributeKey.Value); } else if (tag == "SensorLevel") { (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; } } } else if (btn.GetType() == typeof(ArcSeekBar)) { (btn as ArcSeekBar).ProgressBarColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; // public static void LoadEvent_UpdataStatus(Function updateTemp) // { // Application.RunOnMainThread(() =>{ // if (bodyView != null) // { // for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++) // { // var sensorTag = updateTemp.sid; // var view = bodyView.sensorListView.GetChildren(i); // if (view.GetType() == typeof(FrameLayout)) // { // if(view.Tag.ToString() != sensorTag) // { // continue; // } // for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++) // { // var btn = (view as FrameLayout).GetChildren(j); // if (btn.GetType() == typeof(Button)) // { // if (btn.Tag!=null) // { // var tag = btn.Tag.ToString(); // if (tag == "SensorValues") // { // (btn as Button).Text = updateTemp.GetAttrState(FunctionAttributeKey.Value); // } // else if (tag == "SensorLevel") // { // (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; // (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; // } // } // } // else if (btn.GetType() == typeof(ArcSeekBar)) // { // (btn as ArcSeekBar).ProgressBarColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; (btn as ArcSeekBar).Progress = (96 / bodyView.sensorTemp.GetLevelColorList(updateTemp.spk).Count) * bodyView.sensorTemp.GetCurLevel(updateTemp); } } } } } }); } // (btn as ArcSeekBar).Progress = (96 / bodyView.sensorTemp.GetLevelColorList(updateTemp.spk).Count) * bodyView.sensorTemp.GetCurLevel(updateTemp); // } // } // } // } // } // }); // } void LoadEvent_ChangeWeatherIcon(Button btnWeatherIcon) { // void LoadEvent_ChangeWeatherIcon(Button btnWeatherIcon) // { switch (MainPage.cityInfo.weather) { case "晴": case "Sunny": case "晴天": case "天晴": case "Clear": case "大部晴朗": case "Mostly Sunny": case "晴時多雲": case "陽光充沛": case "Mostly Clear": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/0.png"; break; case "多云": case "Cloudy": case "多雲": case "少云": case "Partly Cloudy": case "少雲": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/1.png"; break; case "阴": case "Overcast": case "陰天": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/2.png"; break; case "阵雨": case "Showers": case "陣雨": case "驟雨": case "局部阵雨": case "Scattered Showers": case "局地陣雨": case "局部地區性驟雨": case "小阵雨": case "Light Showers": case "小陣雨": case "零散驟雨": case "强阵雨": case "Heavy Showers": case "強陣雨": case "間中有驟雨": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png"; break; case "阵雪": case "Snow Showers": case "陣雪": case "驟雪": case "小阵雪": case "Light Snow Showers": case "小陣雪": case "零散驟雪": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png"; break; case "雾": case "Fog": case "霧": case "薄霧": case "冻雾": case "Freezing Fog": case "凍霧": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/18.png"; break; case "沙尘暴": case "Sandstorm": case "沙塵暴": case "强沙尘暴": case "Heavy Sandstorm": case "強沙塵暴": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/20.png"; break; case "浮尘": case "Dust": case "浮塵": case "尘卷风": case "Dust Storm": case "塵捲風": case "扬沙": case "Sand": case "揚沙": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/29.png"; break; case "霾": case "Haze": case "煙霞": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/45.png"; break; case "雷阵雨": case "Thundershower": case "雷陣雨": case "雷雨": case "雷电": case "Lightning": case "雷電": case "雷暴": case "Thunderstorm": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/4.png"; break; case "雷阵雨伴有冰雹": case "Thundershower with Hail": case "雷陣雨伴有冰雹": case "雷雨伴有冰雹": case "冰雹": case "Hail": case "冰针": case "Needle Ice": case "冰針": case "冰粒": case "Icy": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/5.png"; break; case "雨夹雪": case "Sleet": case "雨夾雪": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/6.png"; break; case "小雨": case "Light Rain": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png"; break; case "中雨": case "Rain": case "小到中雨": case "雨": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png"; break; case "大雨": case "Heavy Rain": case "中到大雨": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png"; break; case "暴雨": case "Rainstorm": case "豪雨": case "大暴雨": case "Heavy Rainstorm": case "大豪雨": case "特大暴雨": case "Extreme Rainstorm": case "超大豪雨": case "大到暴雨": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png"; break; case "小雪": case "Light Snow": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png"; break; case "雪": case "中雪": case "小到中雪": case "Snow": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png"; break; case "大雪": case "Heavy Snow": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png"; break; case "暴雪": case "Blizzard": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png"; break; case "冻雨": case "Freezing Rain": case "凍雨": btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/6.png"; break; } } } } // switch (MainPage.cityInfo.weather) // { // case "晴": // case "Sunny": // case "晴天": // case "天晴": // case "Clear": // case "大部晴朗": // case "Mostly Sunny": // case "晴時多雲": // case "陽光充沛": // case "Mostly Clear": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/0.png"; // break; // case "多云": // case "Cloudy": // case "多雲": // case "少云": // case "Partly Cloudy": // case "少雲": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/1.png"; // break; // case "阴": // case "Overcast": // case "陰天": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/2.png"; // break; // case "阵雨": // case "Showers": // case "陣雨": // case "驟雨": // case "局部阵雨": // case "Scattered Showers": // case "局地陣雨": // case "局部地區性驟雨": // case "小阵雨": // case "Light Showers": // case "小陣雨": // case "零散驟雨": // case "强阵雨": // case "Heavy Showers": // case "強陣雨": // case "間中有驟雨": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png"; // break; // case "阵雪": // case "Snow Showers": // case "陣雪": // case "驟雪": // case "小阵雪": // case "Light Snow Showers": // case "小陣雪": // case "零散驟雪": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png"; // break; // case "雾": // case "Fog": // case "霧": // case "薄霧": // case "冻雾": // case "Freezing Fog": // case "凍霧": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/18.png"; // break; // case "沙尘暴": // case "Sandstorm": // case "沙塵暴": // case "强沙尘暴": // case "Heavy Sandstorm": // case "強沙塵暴": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/20.png"; // break; // case "浮尘": // case "Dust": // case "浮塵": // case "尘卷风": // case "Dust Storm": // case "塵捲風": // case "扬沙": // case "Sand": // case "揚沙": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/29.png"; // break; // case "霾": // case "Haze": // case "煙霞": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/45.png"; // break; // case "雷阵雨": // case "Thundershower": // case "雷陣雨": // case "雷雨": // case "雷电": // case "Lightning": // case "雷電": // case "雷暴": // case "Thunderstorm": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/4.png"; // break; // case "雷阵雨伴有冰雹": // case "Thundershower with Hail": // case "雷陣雨伴有冰雹": // case "雷雨伴有冰雹": // case "冰雹": // case "Hail": // case "冰针": // case "Needle Ice": // case "冰針": // case "冰粒": // case "Icy": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/5.png"; // break; // case "雨夹雪": // case "Sleet": // case "雨夾雪": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/6.png"; // break; // case "小雨": // case "Light Rain": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png"; // break; // case "中雨": // case "Rain": // case "小到中雨": // case "雨": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png"; // break; // case "大雨": // case "Heavy Rain": // case "中到大雨": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png"; // break; // case "暴雨": // case "Rainstorm": // case "豪雨": // case "大暴雨": // case "Heavy Rainstorm": // case "大豪雨": // case "特大暴雨": // case "Extreme Rainstorm": // case "超大豪雨": // case "大到暴雨": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/3.png"; // break; // case "小雪": // case "Light Snow": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png"; // break; // case "雪": // case "中雪": // case "小到中雪": // case "Snow": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png"; // break; // case "大雪": // case "Heavy Snow": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png"; // break; // case "暴雪": // case "Blizzard": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/13.png"; // break; // case "冻雨": // case "Freezing Rain": // case "凍雨": // btnWeatherIcon.UnSelectedImagePath = "Public/AirIcon/6.png"; // break; // } // } // } //} HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -66,7 +66,7 @@ { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), Height = Application.GetRealHeight(420), Height = Application.GetRealWidth(420), BackgroundColor = CSS_Color.MainBackgroundColor, Radius = (uint)Application.GetRealWidth(12), BorderColor = 0x00000000, @@ -139,7 +139,7 @@ HorizontalScrolViewLayout tipValuesView = new HorizontalScrolViewLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(348), Y = Application.GetRealWidth(348), Width = Application.GetRealWidth(303), Height = Application.GetRealHeight(30), }; @@ -872,7 +872,8 @@ { Application.RunOnMainThread(() => { new PublicAssmebly().TipMsgAutoClose(Language.StringByID(StringId.GetSensorHistoryFailed), true); IMessageCommon.Current.ShowErrorInfoAlter("", true, 2, Language.StringByID(StringId.GetSensorHistoryFailed),false); //new PublicAssmebly().TipMsgAutoClose(Language.StringByID(StringId.GetSensorHistoryFailed), true); }); } } ThirdPartyIntegration/HdlBluWi/Blufi.xcodeproj/project.xcworkspace/xcuserdata/kaede.xcuserdatad/UserInterfaceState.xcuserstateBinary files differ
ThirdPartyIntegration/HdlBluWi/Blufi.xcodeproj/xcuserdata/kaede.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -4,6 +4,11 @@ <dict> <key>SchemeUserState</key> <dict> <key>Blufi.xcscheme_^#shared#^_</key> <dict> <key>orderHint</key> <integer>0</integer> </dict> <key>HdlBluWi.xcscheme_^#shared#^_</key> <dict> <key>orderHint</key>