From f16e7e4df7e7813e4a3052dae752aae3e6937b30 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 08 七月 2022 16:53:12 +0800 Subject: [PATCH] 自研可视对讲、毫米波 --- HDL-ON_Android/Properties/AndroidManifest.xml | 2 HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 2 HDL-ON_Android/Assets/Language.ini | 4 HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacControlPage.cs | 137 ++++- DLL/Linphone/iOS/Shared.IOS.HDLLinphoneSDK.dll | 0 HDL-ON_iOS/HDL-ON_iOS.csproj | 2 HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/HvacCacTempIcon.png | 0 HDL_ON/UI/UI0-Public/AppUnlockPage.cs | 20 HDL-ON_iOS/AppDelegate.cs | 5 HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/HvacCacHumidityIcon.png | 0 HDL-ON_Android/HDL-ON_Android.csproj | 2 HDL-ON_Android/LeChengVideoActivity.cs | 4 HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs | 68 ++ HDL-ON_iOS/Resources/Language.ini | 73 +++ HDL_ON/Common/HDLCommon.cs | 16 HDL_ON/UI/MainPage.cs | 839 +++++++++++++++++++------------------- HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs | 6 HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/HvacCacHumidityIcon.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/HvacCacTempIcon.png | 0 HDL_ON/Entity/FunctionList.cs | 1 HDL_ON/Entity/Function/Function.cs | 4 HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 36 HDL_ON/Common/UserInfo.cs | 16 HDL_ON/Common/R.cs | 4 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs | 38 + HDL-ON_Android/Other/JPush/JPushReceiver.cs | 6 26 files changed, 802 insertions(+), 483 deletions(-) diff --git a/DLL/Linphone/iOS/Shared.IOS.HDLLinphoneSDK.dll b/DLL/Linphone/iOS/Shared.IOS.HDLLinphoneSDK.dll index 10f902a..d60003a 100644 --- a/DLL/Linphone/iOS/Shared.IOS.HDLLinphoneSDK.dll +++ b/DLL/Linphone/iOS/Shared.IOS.HDLLinphoneSDK.dll Binary files differ diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 13dc635..a22d7c5 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -530,6 +530,7 @@ 542=Wandering alarm 543=Get more 544=Angle +545=Alarm data statistics 2532=Visitor Invitation Record 2533=Visitor management @@ -1717,6 +1718,7 @@ 542=寰樺緤鎶ヨ 543=鑾峰彇鏇村 544=瑙掑害 +545=鎶ヨ鏁版嵁缁熻 2532=璁垮閭�璇疯褰� @@ -2884,6 +2886,7 @@ 542=Wandering alarm 543=Get more 544=Angle +545=Alarm data statistics 2532=Visitor Invitation Record 2533=Visitor management @@ -4062,6 +4065,7 @@ 542=Wandering alarm 543=Get more 544=Angle +545=Alarm data statistics 1000=Humedad de ambiente 1001=V-chip diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/HvacCacHumidityIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/HvacCacHumidityIcon.png new file mode 100644 index 0000000..132a38a --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/HvacCacHumidityIcon.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/HvacCacTempIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/HvacCacTempIcon.png new file mode 100644 index 0000000..2fb446e --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/CAC/HvacCacTempIcon.png Binary files differ diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj index 118473d..7614a45 100644 --- a/HDL-ON_Android/HDL-ON_Android.csproj +++ b/HDL-ON_Android/HDL-ON_Android.csproj @@ -251,6 +251,8 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtaindream_blue.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\curtaindream_white.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\curtaindream.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\CAC\HvacCacHumidityIcon.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\CAC\HvacCacTempIcon.png" /> </ItemGroup> <ItemGroup> <AndroidResource Include="Resources\values\colors.xml" /> diff --git a/HDL-ON_Android/LeChengVideoActivity.cs b/HDL-ON_Android/LeChengVideoActivity.cs index 1d26881..2ef70ae 100644 --- a/HDL-ON_Android/LeChengVideoActivity.cs +++ b/HDL-ON_Android/LeChengVideoActivity.cs @@ -19,6 +19,7 @@ using Com.Lechange.Opensdk.Device; using Com.Lechange.Opensdk.Listener; using Com.Lechange.Opensdk.Media; +using HDL_ON; using HDL_ON.DAL.Server; using HDL_ON_Android.LeChengView.Form; using Java.IO; @@ -166,6 +167,7 @@ /// </summary> public void StartTalk() { + UserInfo.Current.inVideo = true; CloseAudio();// 鍏抽棴Audio LCOpenSDK_Talk.Listener = new AudioTalkerListener();//璁剧疆瀵硅鐩戝惉 //2021-10-29 瀵硅璇锋眰绫诲瀷锛宑all鍛煎彨锛屽鏋滀笉浼狅紝榛樿涓簍alk @@ -184,6 +186,8 @@ /// </summary> public void StopTalk() { + UserInfo.Current.inCall = DateTime.MinValue; + UserInfo.Current.inVideo = false; LCOpenSDK_Talk.StopTalk(); LCOpenSDK_Talk.Listener = null; } diff --git a/HDL-ON_Android/Other/JPush/JPushReceiver.cs b/HDL-ON_Android/Other/JPush/JPushReceiver.cs index b41aec6..07f2fcb 100644 --- a/HDL-ON_Android/Other/JPush/JPushReceiver.cs +++ b/HDL-ON_Android/Other/JPush/JPushReceiver.cs @@ -65,6 +65,12 @@ Utlis.WriteLine("PushMes messageType : " + pushMes.messageType); } + if (!string.IsNullOrEmpty(pushMes.spk))//鑷爺鍙瀵硅闇�瑕佽褰曟椂闂村弽鍛� + { + UserInfo.Current.pushMessageInfo = pushMes; + UserInfo.Current.inCall = DateTime.Now; + } + Utlis.WriteLine("PushMes title : " + pushMes.Title); Utlis.WriteLine("PushMes message : " + pushMes.Content); Utlis.WriteLine("PushMes extras : " + pushMes.Extras); diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index 218c92d..09ee412 100644 --- a/HDL-ON_Android/Properties/AndroidManifest.xml +++ b/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:versionName="1.5.9" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202207041"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.9" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202207081"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <!--鍙嬬洘--> <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs index 992f0ff..702722c 100644 --- a/HDL-ON_iOS/AppDelegate.cs +++ b/HDL-ON_iOS/AppDelegate.cs @@ -388,6 +388,11 @@ Utlis.WriteLine("PushMes title : " + pushMes.Title); Utlis.WriteLine("PushMes message : " + pushMes.Content); Utlis.WriteLine("PushMes extras : " + pushMes.Extras); + if (!string.IsNullOrEmpty(pushMes.spk))//鑷爺鍙瀵硅闇�瑕佽褰曟椂闂村弽鍛� + { + UserInfo.Current.pushMessageInfo = pushMes; + UserInfo.Current.inCall = DateTime.Now; + } if (bFinishedLaunching) { diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index bc99078..92730c7 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -1413,6 +1413,8 @@ <BundleResource Include="Resources\Phone\FunctionIcon\Icon\curtaindream.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtaindream_blue.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\curtaindream_white.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\CAC\HvacCacHumidityIcon.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\CAC\HvacCacTempIcon.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 55ffaab..a22d7c5 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -530,6 +530,28 @@ 542=Wandering alarm 543=Get more 544=Angle +545=Alarm data statistics + +2532=Visitor Invitation Record +2533=Visitor management +2534=Visitor Invitation +2535=Record +2536=*After you initiate the visitor certificate, you can unlock the door by password or swipe the code freely within the validity period you set. Please share the certificate carefully. +2537=Input phone number of the visitor +2538=Input 6-digits temporary password +2539=Random Generation +2540=After confirmation, the visitor QR code will be generated, and the 6-digit dynamic digital password SMS will also be sent to the visitor mobile phone. +2541=Are you sure to delete visitor credentials? +2542=Long press the QR code to save the QR code to the album +2543=QR code is invalid +2544=Generate Visitor Credentials +2545=Cancle Visitor Credentials +2546=Visitor QR Code +2547=Phone Number +2548=Please enter a correct phone number +2549=Please select a effective time +2550=Please select a expire time +2551=Temporary password is invalid 1000=Room Humidity @@ -1051,6 +1073,7 @@ 7158=is 7159=Fall in the alarm 7160=Someone called the police + @@ -1695,7 +1718,34 @@ 542=寰樺緤鎶ヨ 543=鑾峰彇鏇村 544=瑙掑害 +545=鎶ヨ鏁版嵁缁熻 + +2532=璁垮閭�璇疯褰� +2533=璁垮绠$悊 +2534=璁垮閭�璇� +2535=璁垮璁板綍 +2536=*鎮ㄥ彂璧疯瀹㈠嚟璇佸悗锛岃鍑瘉灏嗗湪鎮ㄨ缃殑鏈夋晥鏈熷唴锛屽彲鑷敱鍒风爜鎴栧瘑鐮佸紑閿佽繘琛岃繘鍑猴紝璇疯皑鎱庡垎浜鍑瘉銆� +2537=杈撳叆璁垮鎵嬫満鍙风爜 +2538=杈撳叆6浣嶅姩鎬佸瘑鐮� +2539=闅忔満鐢熸垚 + +2540=纭鍚庯紝浼氱敓鎴愯瀹簩缁寸爜锛屽悓鏃朵篃浼氬皢6浣嶅姩鎬佹暟瀛楀瘑鐮佺煭淇″彂閫佸埌璁垮鎵嬫満涓娿�� +2541=纭畾鍒犻櫎璁垮鍑瘉锛� + +2542=闀挎寜浜岀淮鐮佸彲浠ュ皢浜岀淮鐮佷繚瀛樺埌鐩稿唽 +2543=浜岀淮鐮佸凡澶辨晥 +2544=鐢熸垚璁垮鍑瘉 +2545=鍙栨秷璁垮鍑瘉 +2546=璁垮浜岀淮鐮� +2547=鎵嬫満鍙� +2548=璇疯緭鍏ユ纭殑鎵嬫満鍙风爜 +2549=璇烽�夋嫨鐢熸晥鏃堕棿 +2550=璇烽�夋嫨澶辨晥鏃堕棿 +2551=鍔ㄦ�佸瘑鐮佸凡澶辨晥 + + + 1000=瀹ゅ唴婀垮害 1001=绔ラ攣 1002=璐熺瀛� @@ -2836,6 +2886,28 @@ 542=Wandering alarm 543=Get more 544=Angle +545=Alarm data statistics + +2532=Visitor Invitation Record +2533=Visitor management +2534=Visitor Invitation +2535=Record +2536=*After you initiate the visitor certificate, you can unlock the door by password or swipe the code freely within the validity period you set. Please share the certificate carefully. +2537=Input phone number of the visitor +2538=Input 6-digits temporary password +2539=Random Generation +2540=After confirmation, the visitor QR code will be generated, and the 6-digit dynamic digital password SMS will also be sent to the visitor mobile phone. +2541=Are you sure to delete visitor credentials? +2542=Long press the QR code to save the QR code to the album +2543=QR code is invalid +2544=Generate Visitor Credentials +2545=Cancle Visitor Credentials +2546=Visitor QR Code +2547=Phone Number +2548=Please enter a correct phone number +2549=Please select a effective time +2550=Please select a expire time +2551=Temporary password is invalid 1000=袙谢邪卸薪芯褋褌褜 胁 袩芯屑械褖械薪懈懈 @@ -3993,6 +4065,7 @@ 542=Wandering alarm 543=Get more 544=Angle +545=Alarm data statistics 1000=Humedad de ambiente 1001=V-chip diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/HvacCacHumidityIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/HvacCacHumidityIcon.png new file mode 100644 index 0000000..132a38a --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/HvacCacHumidityIcon.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/HvacCacTempIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/HvacCacTempIcon.png new file mode 100644 index 0000000..2fb446e --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/CAC/HvacCacTempIcon.png Binary files differ diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs index 41a8562..1a42157 100644 --- a/HDL_ON/Common/HDLCommon.cs +++ b/HDL_ON/Common/HDLCommon.cs @@ -301,9 +301,23 @@ else if (jpushMessageInfo.messageType.Contains(PushMessageType.HDL_INTERPHONE.ToString())) { if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return; - + //瀛楁鍏煎闂锛屽彧鑳界洿鎺ュ彇鍊间簡 var json = Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent); + try + { + var pushTime = json["pushTime"]; + if (!string.IsNullOrEmpty(pushTime.ToString())) + { + var pushDateTime = Utlis.UnixToDateTimeMS(Convert.ToInt64(pushTime)); + if (pushDateTime.AddSeconds(30) < DateTime.Now) + { + return; + } + } + } + catch { } + //1.瑙嗗璁插巶瀹剁被鍨� string interphoneTypeEnum = json["interphoneTypeEnum"].ToString(); if (string.IsNullOrEmpty(interphoneTypeEnum)) return; diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index f60d663..c2551df 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -5,6 +5,10 @@ public static class StringId { /// <summary> + /// 鎶ヨ鏁版嵁缁熻 + /// </summary> + public const int AlarmDataStatistics = 545; + /// <summary> /// 瑙掑害 /// </summary> public const int Angle = 544; diff --git a/HDL_ON/Common/UserInfo.cs b/HDL_ON/Common/UserInfo.cs index 5ba0686..c162a0c 100644 --- a/HDL_ON/Common/UserInfo.cs +++ b/HDL_ON/Common/UserInfo.cs @@ -322,5 +322,21 @@ return path + "/"; } + + + /// <summary> + /// 鎺ㄩ�佹秷鎭褰� + /// </summary> + public JPushMessageInfo pushMessageInfo = new JPushMessageInfo(); + /// <summary> + /// 鏄惁宸茬粡鍔犺浇鍛煎彨寮圭獥 + /// </summary> + public bool alreadyShowCallInDialog = false; + + [Newtonsoft.Json.JsonIgnore] + public bool inVideo = false; + [Newtonsoft.Json.JsonIgnore] + public DateTime inCall = DateTime.MinValue; + } } \ No newline at end of file diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index d7e0056..b173aa1 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -1025,6 +1025,10 @@ /// </summary> public const string RoomHumidity = "room_humidity"; /// <summary> + /// 闇茬偣娓╁害 + /// </summary> + public const string dew_point_temp = "dew_point_temp"; + /// <summary> /// value /// </summary> public const string Value = "value"; diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index ce16d6d..9dce5c5 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -471,6 +471,7 @@ if (readList.Count > 9) { Control.Ins.SendReadCommand(readList); + readList.Clear(); } } if (readList.Count > 0) diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index 21e872a..8029597 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -8,88 +8,88 @@ namespace HDL_ON { - public static class MainPage - { - - /// <summary> - /// BaseView - /// </summary> - public static FrameLayout BaseView { get; internal set; } - /// <summary> - /// BasePageView - /// </summary> - public static PageLayout BasePageView { get; set; } - /// <summary> - /// 鐢ㄦ埛鎺у埗鐖跺鍣� - /// </summary> - public static UserPage UserBasePage; - /// <summary> - /// 鐗堟湰鍙� - /// </summary> - public static string VersionString = "1.5.9"; - ///// <summary> - ///// 瀹㈡埛绔被鍨� - ///// </summary> - //public static string ClientType = APIClientType.HDL_ON_PRO.ToString(); - - /// <summary> - /// - /// </summary> - public static Entity.CityInfo cityInfo = new Entity.CityInfo(); - /// <summary> - /// 澶╂皵鍒锋柊action - /// </summary> - public static Action RefreshAir; - /// <summary> - /// 鍥為��椤甸潰action 娌℃湁闇�瑕佸彲浠ヤ笉鐢� - /// </summary> - public static Action ReturnRefreshAction; - /// <summary> - /// 鏃犵櫥褰曟ā寮� - /// </summary> - public static bool NoLoginMode = false; - /// <summary> - /// 缃戠粶杩炴帴鐘舵�� - /// 0:鏃犵綉缁� - /// </summary> - public static int InternetStatus = 2; - /// <summary> - /// 鏄惁杩涘叆鍚庡彴 - /// </summary> - public static bool IsEnterBackground = false; - /// <summary> - /// 褰撳墠鍒嗛〉绱㈠紩 - /// 0:鏀惰棌 - /// 1:鍒嗙被 - /// 2:鏅鸿兘 - /// 3:涓汉 - /// </summary> - public static int CurPageIndex = 9999; - - ///// <summary> - ///// 鍏徃浠g爜 - ///// 棰勭暀绗笁鏂瑰畾鍒舵爣璁� - ///// 0:HDL - ///// </summary> - //public static int Company = 0; - - /// <summary> - /// 鍙虫粦鍚庨��鎻愮ず鎸夐挳 - /// </summary> - public static Button BtnBackIcon; - /// <summary> - /// 鍚庨��鍙虫粦浜嗗灏戣窛绂伙紝瓒呰繃涓�瀹氳窛绂绘墠瑙﹀彂鍚庨��浜嬩欢 - /// </summary> - public static int StartX = 0; - /// <summary> - /// 鏄惁鍏ㄩ潰灞忔墜鏈� - /// </summary> - public static bool Increase + public static class MainPage { - get - { + + /// <summary> + /// BaseView + /// </summary> + public static FrameLayout BaseView { get; internal set; } + /// <summary> + /// BasePageView + /// </summary> + public static PageLayout BasePageView { get; set; } + /// <summary> + /// 鐢ㄦ埛鎺у埗鐖跺鍣� + /// </summary> + public static UserPage UserBasePage; + /// <summary> + /// 鐗堟湰鍙� + /// </summary> + public static string VersionString = "1.5.9"; + ///// <summary> + ///// 瀹㈡埛绔被鍨� + ///// </summary> + //public static string ClientType = APIClientType.HDL_ON_PRO.ToString(); + + /// <summary> + /// + /// </summary> + public static Entity.CityInfo cityInfo = new Entity.CityInfo(); + /// <summary> + /// 澶╂皵鍒锋柊action + /// </summary> + public static Action RefreshAir; + /// <summary> + /// 鍥為��椤甸潰action 娌℃湁闇�瑕佸彲浠ヤ笉鐢� + /// </summary> + public static Action ReturnRefreshAction; + /// <summary> + /// 鏃犵櫥褰曟ā寮� + /// </summary> + public static bool NoLoginMode = false; + /// <summary> + /// 缃戠粶杩炴帴鐘舵�� + /// 0:鏃犵綉缁� + /// </summary> + public static int InternetStatus = 2; + /// <summary> + /// 鏄惁杩涘叆鍚庡彴 + /// </summary> + public static bool IsEnterBackground = false; + /// <summary> + /// 褰撳墠鍒嗛〉绱㈠紩 + /// 0:鏀惰棌 + /// 1:鍒嗙被 + /// 2:鏅鸿兘 + /// 3:涓汉 + /// </summary> + public static int CurPageIndex = 9999; + + ///// <summary> + ///// 鍏徃浠g爜 + ///// 棰勭暀绗笁鏂瑰畾鍒舵爣璁� + ///// 0:HDL + ///// </summary> + //public static int Company = 0; + + /// <summary> + /// 鍙虫粦鍚庨��鎻愮ず鎸夐挳 + /// </summary> + public static Button BtnBackIcon; + /// <summary> + /// 鍚庨��鍙虫粦浜嗗灏戣窛绂伙紝瓒呰繃涓�瀹氳窛绂绘墠瑙﹀彂鍚庨��浜嬩欢 + /// </summary> + public static int StartX = 0; + /// <summary> + /// 鏄惁鍏ㄩ潰灞忔墜鏈� + /// </summary> + public static bool Increase + { + get + { #if __IOS__ - if (Application.PhoneType>10) + if (Application.PhoneType > 10) { return true; } @@ -97,13 +97,13 @@ #else return false; #endif - } - } + } + } - /// <summary> - /// 鍦烘櫙鏀寔鐨勫姛鑳藉垪琛� - /// </summary> - public static List<string> SceneSupportFunctionList = new List<string> { + /// <summary> + /// 鍦烘櫙鏀寔鐨勫姛鑳藉垪琛� + /// </summary> + public static List<string> SceneSupportFunctionList = new List<string> { SPK.LightCCT,SPK.LightDimming,SPK.LightSwitch,SPK.LightRGB, SPK.CurtainRoller,SPK.CurtainSwitch,SPK.CurtainTrietex,SPK.CurtainDream, SPK.AcIr,SPK.AcStandard,SPK.HvacAC, @@ -114,354 +114,357 @@ }; - static List<string> _RoomNotSupportFunctionList = null; - /// <summary> - /// 鎴块棿鍔熻兘鍒楄〃涓嶅姞杞界殑鍔熻兘鍒楄〃 - /// </summary> - public static List<string> RoomNotSupportFunctionList - { - get - { - if (_RoomNotSupportFunctionList == null) + static List<string> _RoomNotSupportFunctionList = null; + /// <summary> + /// 鎴块棿鍔熻兘鍒楄〃涓嶅姞杞界殑鍔熻兘鍒楄〃 + /// </summary> + public static List<string> RoomNotSupportFunctionList { - _RoomNotSupportFunctionList = new List<string>(); - _RoomNotSupportFunctionList.Add(SPK.EnergyStandard); - _RoomNotSupportFunctionList.Add(SPK.MusicStandard); - _RoomNotSupportFunctionList.Add(SPK.AvMusic); - _RoomNotSupportFunctionList.Add(SPK.AirSwitch); - _RoomNotSupportFunctionList.Add(SPK.ElectricEnergy); - _RoomNotSupportFunctionList.AddRange(SPK.EnvironDeviceSpkList()); - _RoomNotSupportFunctionList.AddRange(SPK.ArmSensorSpkList()); - } - return _RoomNotSupportFunctionList; - } - } - - public static void Show() - { - try - { - Application.DesignWidth = 375; - Application.DesignHeight = 667; - - BaseView = Application.MainPage; - Application.MainPage.BackgroundColor = CSS_Color.MainBackgroundColor; - Language.UpdateLanguage(); - //#region 娴嬭瘯 - //var ddd = new UI.test.TestDialog(); - //ddd.InitView(); - //return; - //#endregion - - if (string.IsNullOrEmpty(OnAppConfig.Instance.LastLoginUserId)) - { - GoLoginPage(); - } - else - { - //鍒ゆ柇闇�涓嶉渶瑕佺櫥褰曪紝鏈夋病鏈夌櫥褰曪紝鎴栬�呯櫥褰曟槸鍚﹁繃鏈燂紝 - if (UserInfo.Current == null || !UserInfo.Current.IsLogin) - { - GoLoginPage(UserInfo.Current); - } - else - { - //new System.Threading.Thread(() => - //{ - // var pm = new DAL.Server.HttpServerRequest(); - // pm.RefreshToken();//鍒锋柊Token - // pm.GetHomePager();//鍒锋柊浣忓畢淇℃伅 - // pm.GetUserInfo();//鍒锋柊涓汉淇℃伅 - //}) - //{ IsBackground = true }.Start(); - Common.ApiUtlis.Ins.DownloadData(); - - GoUserPage(false, true); - } - } - } - catch (Exception ex) - { - Log("root erorr : " + ex.Message); - } - finally - { - //Application.RunOnMainThread(() => { - // Application.HideSoftInput(); - //}); - } - } - - /// <summary> - /// 杩涘叆鐧诲綍鐣岄潰 - /// </summary> - public static void GoLoginPage(UserInfo userInfo = null) - { - BaseView.RemoveAll(); - BaseView.BackgroundColor = CSS_Color.BackgroundColor; - var fisrtView = new UI.UI1Login.LoginPage(); - fisrtView.BackgroundColor = CSS_Color.MainBackgroundColor; - BaseView.AddChidren(fisrtView); - fisrtView.LoadView(userInfo); - } - - /// <summary> - /// 杩涘叆涓婚〉 - /// </summary> - /// <param name="isFirstOpen">濡傛灉鏄涓�娆″惎鍔� 妫�娴嬫牎楠屽瘑鐮�</param> - /// <param name="pageShowEvent">涓婚〉鏄剧ず涔嬪悗瑙﹀彂鐨勪簨浠�(娌℃湁浣忓畢鐨勮瘽,鍒欎笉浼氳Е鍙�)</param> - public static void GoUserPage(bool downloadData, bool isFirstOpen = false, Action pageShowEvent = null) - { - BaseView.RemoveAll(); - #region 鍚庨��浜嬩欢 - BasePageView = new PageLayout(); - BasePageView.ScrollEnabled = false; - BasePageView.IsShowPoint = false; - BasePageView.PageChange = (sender, e) => - { - if (e < BasePageView.ChildrenCount - 1) - { - BasePageView.GetChildren(BasePageView.ChildrenCount - 1).RemoveFromParent(); - } - try - { - ReturnRefreshAction?.Invoke(); - ReturnRefreshAction = null; - } - catch (Exception ex) - { - Log($"鍚庨��浜嬩欢寮傚父:{ex.Message}"); - } - }; - BaseView.AddChidren(BasePageView); - var backView = new FrameLayout() - { - Y = Application.GetRealHeight(100), - Width = Application.GetRealWidth(10), - Height = Application.GetRealHeight(440), - }; - BaseView.AddChidren(backView); - - BtnBackIcon = new Button() - { - X = -Application.GetRealWidth(100), - Gravity = Gravity.CenterVertical, - Width = Application.GetRealWidth(88 / 2), - Height = Application.GetRealHeight(56 / 2), - UnSelectedImagePath = "Public/RightSlideBackIcon.png" - }; - BaseView.AddChidren(BtnBackIcon); - backView.MouseMoveEventHandler = (sender, e) => - { - if (BasePageView.ChildrenCount <= 1) - { - return; - } - MainPage.Log($"move:{e.X}"); - if (StartX == 0 && e.X < 30) - { - StartX = (int)e.X; - } - if (StartX < 30) - { - if (e.X < Application.GetRealWidth(100)) - { - BtnBackIcon.X = (int)e.X - Application.GetRealWidth(100); - } - } - }; - backView.MouseDownEventHandler = (sender, e) => - { - if (BasePageView.ChildrenCount <= 1) - { - return; - } - MainPage.Log($"down:{e.X}"); - StartX = (int)e.X; - BtnBackIcon.Y = (int)e.Y + Application.GetRealHeight(50); - }; - backView.MouseUpEventHandler = (sender, e) => - { - MainPage.Log($"up{e.X}"); - StartX = 0; - BtnBackIcon.X = -Application.GetRealWidth(100); - - if (e.X > 70) - { - if (BasePageView.ChildrenCount > 1) - { - BasePageView.PageIndex = BasePageView.ChildrenCount - 2; - } - } - }; - backView.MouseUpOutsideEventHandler = (sender, e) => - { - MainPage.Log($"up{e.X}"); - StartX = 0; - BtnBackIcon.X = -Application.GetRealWidth(100); - - if (e.X > 70) - { - if (BasePageView.ChildrenCount > 1) - { - BasePageView.PageIndex = BasePageView.ChildrenCount - 2; - } - } - }; - #endregion - - - //浣撻獙妯″紡 - if (NoLoginMode) - { - //璺宠浆椤甸潰---- - UserBasePage = new UserPage(); - BasePageView.AddChidren(UserBasePage); - UserBasePage.LoadPage(); - BasePageView.PageIndex = 0; - - return; - } - - //鍔犺浇Loading鏁堟灉 - var waitPage = new Loading(); - BaseView.AddChidren(waitPage); - waitPage.Start(Language.StringByID(StringId.PleaseWait)); - - //褰撴病鏈変綇瀹呮椂,涓嶈兘璁╁畠寰�涓嬭蛋 - if (UserInfo.Current.regionList.Count == 0) - { - waitPage.Hide(); - var addResidencePage = new BindingResidencePage(); - BaseView.AddChidren(addResidencePage); - addResidencePage.LoadView(); - return; - } - new System.Threading.Thread(async () => - { - try - { - Entity.FunctionList.List.Clear(); - Entity.SpatialInfo.CurrentSpatial.Clear(); - ///绛夊緟鑾峰彇浣忓畢淇℃伅 - Application.RunOnMainThread(() => - { - if (waitPage != null) + get { - waitPage.RemoveFromParent(); - waitPage = null; - } - - //璺宠浆椤甸潰---- - UserBasePage = new UserPage(); - BasePageView.AddChidren(UserBasePage); - UserBasePage.LoadPage(); - BasePageView.PageIndex = 0; - - if (isFirstOpen) - { - //鍚姩瀵嗙爜楠岃瘉 - new AppUnlockPage().LoadPage(isFirstOpen); - } - //涓婚〉鍔犺浇瀹屾垚,鍥炶皟浜嬩欢 - pageShowEvent?.Invoke(); - pageShowEvent = null; - }); - } - catch (Exception ex) - { - MainPage.Log($"GoUserPage : {ex.Message}"); - } - finally - { - Application.RunOnMainThread(() => - { - if (downloadData) - { - DB_ResidenceData.Instance.EixtAccount(); - ///鍒濆鍖朼pp鏁版嵁 - Common.ApiUtlis.Ins.DownloadData(); - }; - }); - } - }).Start(); - - } - - /// <summary> - /// 鍚庨��浜嬩欢 - /// 0:鍚庨�� - /// 1:鏈夌瓑寰呯晫闈� - /// 2:鏃犳硶鍐嶅悗閫�锛屽彲浠ユ墽琛岄��鍒版闈� - /// </summary> - public static int LoadEvent_BackAction() - { - int result = 0; - Application.RunOnMainThread(() => - { - if (BasePageView == null || BasePageView.ChildrenCount <= 1) - { - result = 2;//鏃犳硶鍐嶅悗閫�锛屽彲浠ユ墽琛岄��鍒版闈� - } - if (BasePageView.ChildrenCount > 1) - { - int index = BasePageView.ChildrenCount - 1; - var view = BasePageView.GetChildren(index); - if (view.GetType() == typeof(Loading)) - { - var loading = view as Loading; - if (loading.CurStatus == false)//鏈変竴浜涚瓑寰呯晫闈㈤殣钘忎簡锛屼絾鏄病鏈夌Щ闄ゅ埌锛岄渶瑕佸厛绉婚櫎 - { - loading.RemoveFromParent(); - result = LoadEvent_BackAction(); - } - else - { - result = 1;//姝e湪绛夊緟鏌愪簺鎿嶄綔 - } - } - else - { - if (view != null) - { - if (view.Tag != null) - { - if (view.Tag.ToString() != "unlockpage") + if (_RoomNotSupportFunctionList == null) { - view.RemoveFromParent(); + _RoomNotSupportFunctionList = new List<string>(); + _RoomNotSupportFunctionList.Add(SPK.EnergyStandard); + _RoomNotSupportFunctionList.Add(SPK.MusicStandard); + _RoomNotSupportFunctionList.Add(SPK.AvMusic); + _RoomNotSupportFunctionList.Add(SPK.AirSwitch); + _RoomNotSupportFunctionList.Add(SPK.ElectricEnergy); + _RoomNotSupportFunctionList.AddRange(SPK.EnvironDeviceSpkList()); + _RoomNotSupportFunctionList.AddRange(SPK.ArmSensorSpkList()); + } + return _RoomNotSupportFunctionList; + } + } + + public static void Show() + { + try + { + Application.DesignWidth = 375; + Application.DesignHeight = 667; + //璁剧疆璇█鐜 闃叉string杞� double鍑虹幇閫楀彿锛宼odouble寮傚父绛夐棶棰� + System.Globalization.CultureInfo.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("zh-CN"); + + + BaseView = Application.MainPage; + Application.MainPage.BackgroundColor = CSS_Color.MainBackgroundColor; + Language.UpdateLanguage(); + //#region 娴嬭瘯 + //var ddd = new UI.test.TestDialog(); + //ddd.InitView(); + //return; + //#endregion + + if (string.IsNullOrEmpty(OnAppConfig.Instance.LastLoginUserId)) + { + GoLoginPage(); } else { - result = 2; + //鍒ゆ柇闇�涓嶉渶瑕佺櫥褰曪紝鏈夋病鏈夌櫥褰曪紝鎴栬�呯櫥褰曟槸鍚﹁繃鏈燂紝 + if (UserInfo.Current == null || !UserInfo.Current.IsLogin) + { + GoLoginPage(UserInfo.Current); + } + else + { + //new System.Threading.Thread(() => + //{ + // var pm = new DAL.Server.HttpServerRequest(); + // pm.RefreshToken();//鍒锋柊Token + // pm.GetHomePager();//鍒锋柊浣忓畢淇℃伅 + // pm.GetUserInfo();//鍒锋柊涓汉淇℃伅 + //}) + //{ IsBackground = true }.Start(); + Common.ApiUtlis.Ins.DownloadData(); + + GoUserPage(false, true); + } } - } - else - { - view.RemoveFromParent(); - } } - } + catch (Exception ex) + { + Log("root erorr : " + ex.Message); + } + finally + { + //Application.RunOnMainThread(() => { + // Application.HideSoftInput(); + //}); + } } - else + + /// <summary> + /// 杩涘叆鐧诲綍鐣岄潰 + /// </summary> + public static void GoLoginPage(UserInfo userInfo = null) { - result = 2;//鏃犳硶鍐嶅悗閫�锛屽彲浠ユ墽琛岄��鍒版闈� + BaseView.RemoveAll(); + BaseView.BackgroundColor = CSS_Color.BackgroundColor; + var fisrtView = new UI.UI1Login.LoginPage(); + fisrtView.BackgroundColor = CSS_Color.MainBackgroundColor; + BaseView.AddChidren(fisrtView); + fisrtView.LoadView(userInfo); } - }); - return result; - } + + /// <summary> + /// 杩涘叆涓婚〉 + /// </summary> + /// <param name="isFirstOpen">濡傛灉鏄涓�娆″惎鍔� 妫�娴嬫牎楠屽瘑鐮�</param> + /// <param name="pageShowEvent">涓婚〉鏄剧ず涔嬪悗瑙﹀彂鐨勪簨浠�(娌℃湁浣忓畢鐨勮瘽,鍒欎笉浼氳Е鍙�)</param> + public static void GoUserPage(bool downloadData, bool isFirstOpen = false, Action pageShowEvent = null) + { + BaseView.RemoveAll(); + #region 鍚庨��浜嬩欢 + BasePageView = new PageLayout(); + BasePageView.ScrollEnabled = false; + BasePageView.IsShowPoint = false; + BasePageView.PageChange = (sender, e) => + { + if (e < BasePageView.ChildrenCount - 1) + { + BasePageView.GetChildren(BasePageView.ChildrenCount - 1).RemoveFromParent(); + } + try + { + ReturnRefreshAction?.Invoke(); + ReturnRefreshAction = null; + } + catch (Exception ex) + { + Log($"鍚庨��浜嬩欢寮傚父:{ex.Message}"); + } + }; + BaseView.AddChidren(BasePageView); + var backView = new FrameLayout() + { + Y = Application.GetRealHeight(100), + Width = Application.GetRealWidth(10), + Height = Application.GetRealHeight(440), + }; + BaseView.AddChidren(backView); + + BtnBackIcon = new Button() + { + X = -Application.GetRealWidth(100), + Gravity = Gravity.CenterVertical, + Width = Application.GetRealWidth(88 / 2), + Height = Application.GetRealHeight(56 / 2), + UnSelectedImagePath = "Public/RightSlideBackIcon.png" + }; + BaseView.AddChidren(BtnBackIcon); + backView.MouseMoveEventHandler = (sender, e) => + { + if (BasePageView.ChildrenCount <= 1) + { + return; + } + MainPage.Log($"move:{e.X}"); + if (StartX == 0 && e.X < 30) + { + StartX = (int)e.X; + } + if (StartX < 30) + { + if (e.X < Application.GetRealWidth(100)) + { + BtnBackIcon.X = (int)e.X - Application.GetRealWidth(100); + } + } + }; + backView.MouseDownEventHandler = (sender, e) => + { + if (BasePageView.ChildrenCount <= 1) + { + return; + } + MainPage.Log($"down:{e.X}"); + StartX = (int)e.X; + BtnBackIcon.Y = (int)e.Y + Application.GetRealHeight(50); + }; + backView.MouseUpEventHandler = (sender, e) => + { + MainPage.Log($"up{e.X}"); + StartX = 0; + BtnBackIcon.X = -Application.GetRealWidth(100); + + if (e.X > 70) + { + if (BasePageView.ChildrenCount > 1) + { + BasePageView.PageIndex = BasePageView.ChildrenCount - 2; + } + } + }; + backView.MouseUpOutsideEventHandler = (sender, e) => + { + MainPage.Log($"up{e.X}"); + StartX = 0; + BtnBackIcon.X = -Application.GetRealWidth(100); + + if (e.X > 70) + { + if (BasePageView.ChildrenCount > 1) + { + BasePageView.PageIndex = BasePageView.ChildrenCount - 2; + } + } + }; + #endregion - /// <summary> - /// 鑷畾涔夋棩蹇楄緭鍑� - /// </summary> - public static void Log(string msg) - { + //浣撻獙妯″紡 + if (NoLoginMode) + { + //璺宠浆椤甸潰---- + UserBasePage = new UserPage(); + BasePageView.AddChidren(UserBasePage); + UserBasePage.LoadPage(); + BasePageView.PageIndex = 0; + + return; + } + + //鍔犺浇Loading鏁堟灉 + var waitPage = new Loading(); + BaseView.AddChidren(waitPage); + waitPage.Start(Language.StringByID(StringId.PleaseWait)); + + //褰撴病鏈変綇瀹呮椂,涓嶈兘璁╁畠寰�涓嬭蛋 + if (UserInfo.Current.regionList.Count == 0) + { + waitPage.Hide(); + var addResidencePage = new BindingResidencePage(); + BaseView.AddChidren(addResidencePage); + addResidencePage.LoadView(); + return; + } + new System.Threading.Thread(async () => + { + try + { + Entity.FunctionList.List.Clear(); + Entity.SpatialInfo.CurrentSpatial.Clear(); + ///绛夊緟鑾峰彇浣忓畢淇℃伅 + Application.RunOnMainThread(() => + { + if (waitPage != null) + { + waitPage.RemoveFromParent(); + waitPage = null; + } + + //璺宠浆椤甸潰---- + UserBasePage = new UserPage(); + BasePageView.AddChidren(UserBasePage); + UserBasePage.LoadPage(); + BasePageView.PageIndex = 0; + + if (isFirstOpen) + { + //鍚姩瀵嗙爜楠岃瘉 + new AppUnlockPage().LoadPage(isFirstOpen); + } + //涓婚〉鍔犺浇瀹屾垚,鍥炶皟浜嬩欢 + pageShowEvent?.Invoke(); + pageShowEvent = null; + }); + } + catch (Exception ex) + { + MainPage.Log($"GoUserPage : {ex.Message}"); + } + finally + { + Application.RunOnMainThread(() => + { + if (downloadData) + { + DB_ResidenceData.Instance.EixtAccount(); + ///鍒濆鍖朼pp鏁版嵁 + Common.ApiUtlis.Ins.DownloadData(); + }; + }); + } + }).Start(); + + } + + /// <summary> + /// 鍚庨��浜嬩欢 + /// 0:鍚庨�� + /// 1:鏈夌瓑寰呯晫闈� + /// 2:鏃犳硶鍐嶅悗閫�锛屽彲浠ユ墽琛岄��鍒版闈� + /// </summary> + public static int LoadEvent_BackAction() + { + int result = 0; + Application.RunOnMainThread(() => + { + if (BasePageView == null || BasePageView.ChildrenCount <= 1) + { + result = 2;//鏃犳硶鍐嶅悗閫�锛屽彲浠ユ墽琛岄��鍒版闈� + } + if (BasePageView.ChildrenCount > 1) + { + int index = BasePageView.ChildrenCount - 1; + var view = BasePageView.GetChildren(index); + if (view.GetType() == typeof(Loading)) + { + var loading = view as Loading; + if (loading.CurStatus == false)//鏈変竴浜涚瓑寰呯晫闈㈤殣钘忎簡锛屼絾鏄病鏈夌Щ闄ゅ埌锛岄渶瑕佸厛绉婚櫎 + { + loading.RemoveFromParent(); + result = LoadEvent_BackAction(); + } + else + { + result = 1;//姝e湪绛夊緟鏌愪簺鎿嶄綔 + } + } + else + { + if (view != null) + { + if (view.Tag != null) + { + if (view.Tag.ToString() != "unlockpage") + { + view.RemoveFromParent(); + } + else + { + result = 2; + } + } + else + { + view.RemoveFromParent(); + } + } + } + } + else + { + result = 2;//鏃犳硶鍐嶅悗閫�锛屽彲浠ユ墽琛岄��鍒版闈� + } + }); + return result; + } + + + /// <summary> + /// 鑷畾涔夋棩蹇楄緭鍑� + /// </summary> + public static void Log(string msg) + { #if DEBUG Console.WriteLine(msg); #endif + } + + } - - - } } \ No newline at end of file diff --git a/HDL_ON/UI/UI0-Public/AppUnlockPage.cs b/HDL_ON/UI/UI0-Public/AppUnlockPage.cs index 637798b..ccdeeb4 100644 --- a/HDL_ON/UI/UI0-Public/AppUnlockPage.cs +++ b/HDL_ON/UI/UI0-Public/AppUnlockPage.cs @@ -75,6 +75,26 @@ { if (UserInfo.Current.unlockTime.AddMinutes(5) > DateTime.Now || UserInfo.Current.appUnlockPasswrod == "" || UserInfo.Current.appUnlockPage.Count == 0) { + if (UserInfo.Current.inCall.AddMinutes(30) > DateTime.Now || + UserInfo.Current.inVideo) + { + //UserInfo.Current.PushMesLogTime = DateTime.MinValue; + + //var pushMes = new JPushMessageInfo() + //{ + // Title = UserInfo.Current.PushMesTitle, + // Content = UserInfo.Current.PushMesMessage, + // Extras = UserInfo.Current.PushMesExtras, + // messageType = UserInfo.Current.pushMesMessageType, + // expantContent = UserInfo.Current.pushMesExpantContent, + // HomeId = UserInfo.Current.PushMesHomeId, + //}; + Shared.Application.RunOnMainThread(() => + { + HDLCommon.Current.AdjustPushMessage(UserInfo.Current.pushMessageInfo); + }); + } + return; } } diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index 0fbcc3f..e800dda 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -616,7 +616,7 @@ new FunctionAttributes(){ key = "on_off",curValue = "on",state = "on" }, new FunctionAttributes(){ key = "cac_valve",curValue = "on",state = "on" },//姣涚粏闃� new FunctionAttributes(){ key = "fh_valve",curValue = "on",state = "on" },//鍦版殩闃� - new FunctionAttributes(){ key = "mode",curValue = "cool",state = "cool", value = new List<string>{ "cool","heat","fan"} }, + new FunctionAttributes(){ key = "mode",curValue = "cool",state = "cool", value = new List<string>{ "cool","heat"} }, new FunctionAttributes(){ key = "set_temp",curValue = "20",state = "20",min = 16,max = 30 }, new FunctionAttributes(){ key = "room_temp",curValue = "20",state = "20" }, new FunctionAttributes(){ key = "dew_point_temp",curValue = "20",state = "20" },//闇茬偣娓╁害 diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs index 852711b..a873ee1 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs @@ -106,18 +106,18 @@ { X = Application.GetRealWidth(51), Y = Application.GetRealHeight(66), - Width = Application.GetRealWidth(17), - Height = Application.GetRealWidth(17), - UnSelectedImagePath = "Public/DeviceInfoIcon/HumidityIcon.png", + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "FunctionIcon/CAC/HvacCacHumidityIcon.png", }; bodyDiv.AddChidren(btnHumidityIcon); var btnHumidityValues = new TextButton() { - X = btnHumidityIcon.Right + Application.GetRealWidth(4), - Y = Application.GetRealHeight(66), - Gravity = Gravity.CenterVertical, - TextColor = CSS_Color.MainBackgroundColor, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + X = Application.GetRealWidth(70), + Y = Application.GetRealHeight(64), + Height = Application.GetRealHeight(18), + TextColor = 0xFF161616, + TextSize = CSS_FontSize.TextFontSize, Text = function.GetAttrState(FunctionAttributeKey.RoomHumidity) + "%", TextAlignment = TextAlignment.CenterLeft, }; @@ -126,26 +126,26 @@ Button btnTempIcon = new Button() { - X = btnHumidityValues.Right + Application.GetRealWidth(20), - Gravity = Gravity.CenterVertical, + X = Application.GetRealWidth(110), + Y = Application.GetRealHeight(66), Width = Application.GetMinRealAverage(17), Height = Application.GetMinRealAverage(17), - UnSelectedImagePath = "Public/DeviceInfoIcon/TempIcon.png", + UnSelectedImagePath = "FunctionIcon/CAC/HvacCacTempIcon.png", }; bodyDiv.AddChidren(btnTempIcon); var btnTempValues = new TextButton() { - X = btnTempIcon.Right + Application.GetRealWidth(4), - Gravity = Gravity.CenterVertical, - TextColor = CSS_Color.MainBackgroundColor, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - Text = function.GetAttrState(FunctionAttributeKey.RoomTemp) + "掳", + X = Application.GetRealWidth(130), + Y = Application.GetRealHeight(64), + Height = Application.GetRealHeight(18), + TextColor = 0xFF161616, + TextSize = CSS_FontSize.TextFontSize, + Text = function.GetAttrState(FunctionAttributeKey.RoomTemp) + "掳C", TextAlignment = TextAlignment.CenterLeft, }; btnTempValues.Width = btnTempValues.GetTextWidth(); - btnTempValues.Width = btnTempValues.GetTextWidth(); - bodyDiv.AddChidren(btnTempIcon); + bodyDiv.AddChidren(btnTempValues); var btnJinMaoIcon = new Button() { diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs index fa374cc..208a481 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs @@ -120,10 +120,8 @@ private void InitFrameWhiteContent1() { //鑾峰彇娓╁害鍊� - var setTempTemp = device.GetAttrState(FunctionAttributeKey.SetTemp); - var setTempString = setTempTemp.Replace(",", "."); - var setTempDouble = Convert.ToDouble(setTempString); - temp = Convert.ToInt32(setTempDouble); + string setTempTemp = device.GetAttrState(FunctionAttributeKey.SetTemp); + temp = (int) Convert.ToDouble(setTempTemp); if (temp <= 0) { //榛樿鍊兼敼鎴�16,2022骞�06鏈�10鏃�10:03:19 鎴愮敨瑕佹眰鐨� diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacControlPage.cs index 0aa3098..4eb1277 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacControlPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacControlPage.cs @@ -28,14 +28,27 @@ /// </summary> Button btnTemp; Button btnTempUint; + + /// <summary> + /// 瀹ゅ唴婀垮害鏄剧ず鎺т欢 + /// </summary> + TextButton btnHumidityValues; + /// <summary> + /// 瀹ゅ唴娓╁害鏄剧ず鎺т欢 + /// </summary> + TextButton btnTempValues; /// <summary> /// 瀹ゅ唴娓╁害鎸夐挳 /// </summary> - Button btnIndoorTemp; + //Button btnIndoorTemp; /// <summary> /// 妯″紡鎸夐挳 /// </summary> Button btnMode; + /// <summary> + /// + /// </summary> + Button btnModeText; /// <summary> /// 椋庨�熸寜閽� /// </summary> @@ -114,15 +127,50 @@ /// </summary> private void InitFrameWhiteContent1() { - Button btnJinmaoIcon = new Button() + var btnHumidityIcon = new Button() { - Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(94), - Width = Application.GetRealWidth(164), - Height = Application.GetRealHeight(43), - UnSelectedImagePath = "FunctionIcon/CAC/JinMaoIcon.png" + X = Application.GetRealWidth(55), + Y = Application.GetRealHeight(101), + Width = Application.GetMinRealAverage(28), + Height = Application.GetMinRealAverage(28), + UnSelectedImagePath = "FunctionIcon/CAC/HvacCacHumidityIcon.png", }; - FrameWhiteCentet1.AddChidren(btnJinmaoIcon); + FrameWhiteCentet1.AddChidren(btnHumidityIcon); + btnHumidityValues = new TextButton() + { + X = Application.GetRealWidth(83), + Y = Application.GetRealHeight(96), + Height = Application.GetRealHeight(33), + Width = Application.GetRealWidth(100), + TextColor = 0xFF161616, + TextSize = 24, + Text = device.GetAttrState(FunctionAttributeKey.RoomHumidity) + "%", + TextAlignment = TextAlignment.CenterLeft, + }; + FrameWhiteCentet1.AddChidren(btnHumidityValues); + + Button btnTempIcon = new Button() + { + X = Application.GetRealWidth(194), + Y = Application.GetRealHeight(101), + Width = Application.GetMinRealAverage(28), + Height = Application.GetMinRealAverage(28), + UnSelectedImagePath = "FunctionIcon/CAC/HvacCacTempIcon.png", + }; + FrameWhiteCentet1.AddChidren(btnTempIcon); + + btnTempValues = new TextButton() + { + X = Application.GetRealWidth(222), + Y = Application.GetRealHeight(96), + Height = Application.GetRealHeight(33), + Width = Application.GetRealWidth(100), + TextColor = 0xFF161616, + TextSize = 24, + Text = device.GetAttrState(FunctionAttributeKey.RoomTemp) + "掳C", + TextAlignment = TextAlignment.CenterLeft, + }; + FrameWhiteCentet1.AddChidren(btnTempValues); temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); @@ -141,12 +189,12 @@ OfflineProgressBarColor = CSS_Color.PromptingColor2, ArcColor = CSS_Color.BackgroundColor, #if __IOS__ - Y = Application.GetRealHeight(120 + 25), + Y = Application.GetRealHeight(130 + 25), Width = Application.GetRealWidth(260 - 40), Height = Application.GetRealWidth(260 - 40), SeekBarPadding = Application.GetRealWidth(8), #else - Y = Application.GetRealHeight(120 + 40), + Y = Application.GetRealHeight(130 + 40), Width = Application.GetRealWidth(260 - 40), Height = Application.GetRealWidth(260 - 40), SeekBarPadding = Application.GetRealWidth(7), @@ -165,7 +213,7 @@ btnTemp = new Button() { Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(206), + Y = Application.GetRealHeight(226), Width = Application.GetRealWidth(71), Height = Application.GetRealWidth(60), TextColor = CSS_Color.FirstLevelTitleColor, @@ -190,17 +238,17 @@ }; FrameWhiteCentet1.AddChidren(btnTempUint); - btnIndoorTemp = new Button() - { - Gravity = Gravity.CenterHorizontal, - Y = btnTemp.Bottom, - Width = Application.GetRealWidth(120), - Height = Application.GetRealHeight(20), - Text = Language.StringByID(StringId.IndoorTemp) + "20掳C/" + Language.StringByID(StringId.Humidity) +"45%", - TextColor = CSS_Color.PromptingColor1, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - }; - FrameWhiteCentet1.AddChidren(btnIndoorTemp); + //btnIndoorTemp = new Button() + //{ + // Gravity = Gravity.CenterHorizontal, + // Y = btnTemp.Bottom, + // Width = Application.GetRealWidth(120), + // Height = Application.GetRealHeight(20), + // Text = Language.StringByID(StringId.IndoorTemp) + "20掳C/" + Language.StringByID(StringId.Humidity) +"45%", + // TextColor = CSS_Color.PromptingColor1, + // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + //}; + //FrameWhiteCentet1.AddChidren(btnIndoorTemp); btnMinus = new Button() { @@ -232,16 +280,16 @@ }; FrameWhiteCentet1.AddChidren(btnMode); - Button btnModeText = new Button() + btnModeText = new Button() { X = Application.GetRealWidth(30), - Y = btnMode.Bottom, + Y = btnMode.Bottom + Application.GetRealHeight(4), Width = Application.GetRealWidth(90), Height = Application.GetRealHeight(20), TextAlignment = TextAlignment.Center, TextSize = 12, TextColor = CSS_Color.TextualColor, - TextID = StringId.Mode + Text = acFunction.GetModeAttrText(device.GetAttrState(FunctionAttributeKey.Mode)) }; FrameWhiteCentet1.AddChidren(btnModeText); @@ -540,14 +588,42 @@ /// </summary> void LoadEvent_AcStatesChange() { - btnMode.MouseUpEventHandler = (sender, e) => + + EventHandler<MouseEventArgs> eventHandler = (sender, e) => { if (device.trait_on_off.curValue.ToString() == "off") { return; } - LoadDiv_ChangeModeView(); + var modeValueList = device.GetAttribute(FunctionAttributeKey.Mode).value; + if (modeValueList.Count == 0) + { + return; + } + + var curMode = device.GetAttrState(FunctionAttributeKey.Mode); + var curModeIndex = device.GetAttribute(FunctionAttributeKey.Mode).value.IndexOf(curMode); + if (++curModeIndex >= modeValueList.Count) + { + curModeIndex = 0; + } + var setMode = device.GetAttribute(FunctionAttributeKey.Mode).value[curModeIndex]; + + device.SetAttrState(FunctionAttributeKey.Mode, setMode); + btnModeText.Text = acFunction.GetModeAttrText(setMode); + btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(setMode); + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add(FunctionAttributeKey.Mode, setMode); + Control.Ins.SendWriteCommand(device, d); + + //LoadDiv_ChangeModeView(); }; + + btnMode.MouseUpEventHandler = eventHandler; + btnModeText.MouseUpEventHandler = eventHandler; + + + btnWindSpeed.MouseUpEventHandler = (sender, e) => { var page = new CacHistoryChoosePage(device); @@ -605,8 +681,11 @@ } else { - btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C" - + Language.StringByID(StringId.Humidity) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState("room_humidity").Replace(", ", "."))) + "%"; + //btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C" + // + Language.StringByID(StringId.Humidity) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState("room_humidity").Replace(", ", "."))) + "%"; + btnTempValues.Text = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C"; + btnHumidityValues.Text = Convert.ToInt32(Convert.ToDouble(device.GetAttrState("room_humidity").Replace(", ", "."))) + "%"; + btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)); temp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."))); diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs index a547f49..4aaf5eb 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs @@ -2,6 +2,7 @@ using HDL_ON.Stan; using HDL_ON.UI.CSS; using HDL_ON.Entity; +using System; namespace HDL_ON.UI { @@ -74,6 +75,43 @@ SelectedTextColor = CSS_Color.MainColor, }; FrameWhiteCentet1.AddChidren(btnSuctionView); + + + + + //鍔犺浇鐬椂鍊� + var btnInstantaneousValue = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(391), + Width = Application.GetMinRealAverage(32), + Height = Application.GetMinRealAverage(32), + UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png", + }; + FrameWhiteCentet1.AddChidren(btnInstantaneousValue); + var btnInstantaneousValueText = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = btnInstantaneousValue.Bottom, + Width = Application.GetRealWidth(96), + Height = Application.GetRealHeight(29), + TextAlignment = TextAlignment.Center, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextColor = CSS_Color.TextualColor, + TextID = StringId.AlarmDataStatistics, + IsMoreLines = true + }; + FrameWhiteCentet1.AddChidren(btnInstantaneousValueText); + EventHandler<MouseEventArgs> eventHandler = (sender, e) => { + //var page = new SocketPage_InstantaneousValue(function); + //MainPage.BasePageView.AddChidren(page); + //page.LoadPage(); + //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + btnInstantaneousValue.MouseUpEventHandler = eventHandler; + btnInstantaneousValueText.MouseUpEventHandler = eventHandler; + + } /// <summary> diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs index feb241d..7b0dd8e 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs @@ -107,15 +107,15 @@ }; nameView.AddChidren(btnEditName); - nameView.AddChidren( - new Button() - { - Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(49), - BackgroundColor = CSS_Color.DividingLineColor, - Width = Application.GetRealWidth(343), - Height = Application.GetRealHeight(1) - }); + //nameView.AddChidren( + // new Button() + // { + // Gravity = Gravity.CenterHorizontal, + // Y = Application.GetRealHeight(49), + // BackgroundColor = CSS_Color.DividingLineColor, + // Width = Application.GetRealWidth(343), + // Height = Application.GetRealHeight(1) + // }); #endregion if (locationSetting) @@ -164,7 +164,6 @@ new Button() { Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(54), BackgroundColor = CSS_Color.DividingLineColor, Width = Application.GetRealWidth(343), Height = Application.GetRealHeight(1) @@ -284,7 +283,7 @@ new Button() { Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(54), + //Y = Application.GetRealHeight(54), BackgroundColor = CSS_Color.DividingLineColor, Width = Application.GetRealWidth(343), Height = Application.GetRealHeight(1) @@ -365,6 +364,53 @@ #endregion } + + else if (function.spk == SPK.HvacCac) + { + #region 闇茬偣娓╁害 + if (function.GetAttribute(FunctionAttributeKey.dew_point_temp) != null) + { + contentView.AddChidren(new Button + { + Height = Application.GetRealHeight(10), + }); + + var row = new FrameLayout() + { + Height = Application.GetRealHeight(55), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + contentView.AddChidren(row); + + var btnText = new Button() + { + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(160), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = StringId.DewPointTemp, + }; + row.AddChidren(btnText); + + var btnValue = new Button() + { + Width = Application.GetRealWidth(355), + TextAlignment = TextAlignment.CenterRight, + TextColor = CSS_Color.PromptingColor1, + TextSize = CSS_FontSize.TextFontSize, + Text = function.GetAttrState(FunctionAttributeKey.dew_point_temp) + "掳C", + }; + row.AddChidren(btnValue); + } + #endregion + + + + + } + + LoadEventList(); } -- Gitblit v1.8.0