From 741cf87691107698b211c45df1f7392329e87f9a Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 08 三月 2022 10:36:22 +0800 Subject: [PATCH] 门锁功能、俄语优化 --- HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 36 +++++ HDL-ON_iOS/HDL-ON_iOS.csproj | 1 HDL-ON_iOS/Resources/Phone/Collection/FunctionOfflineBg.png | 0 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs | 12 + HDL-ON_iOS/AppDelegate.cs | 8 HDL_ON/HDL_ON.projitems | 1 HDL-ON_Android/HDL-ON_Android.csproj | 1 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 5 HDL-ON_Android/SplashActivity.cs | 2 HDL-ON_iOS/Info.plist | 4 HDL-ON_iOS/Resources/Language.ini | 9 + HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 4 HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs | 4 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs | 4 HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs | 10 HDL-ON_Android/Assets/Phone/Collection/FunctionOfflineBg.png | 0 HDL_ON/UI/UI1-Login/LoginPage.cs | 5 SiriIntents/Server/HttpUtil.cs | 4 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs | 193 +++++++++++++++++++++++++++ HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs | 4 HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs | 10 HDL-ON_iOS/Main.cs | 2 HDL_ON/Entity/Function/Function.cs | 6 HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 18 ++ HDL_ON/DAL/Server/HttpUtil.cs | 4 HDL_ON/Common/UserInfo.cs | 12 + HDL_ON/Common/R.cs | 12 + HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs | 10 28 files changed, 337 insertions(+), 44 deletions(-) diff --git a/HDL-ON_Android/Assets/Phone/Collection/FunctionOfflineBg.png b/HDL-ON_Android/Assets/Phone/Collection/FunctionOfflineBg.png new file mode 100644 index 0000000..bc09c9b --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/Collection/FunctionOfflineBg.png Binary files differ diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj index 612b27f..cbc8b17 100644 --- a/HDL-ON_Android/HDL-ON_Android.csproj +++ b/HDL-ON_Android/HDL-ON_Android.csproj @@ -226,6 +226,7 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg2.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg3.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg4.png" /> + <AndroidAsset Include="Assets\Phone\Collection\FunctionOfflineBg.png" /> </ItemGroup> <ItemGroup> <AndroidResource Include="Resources\values\colors.xml" /> diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs index b12d59a..afcbe50 100644 --- a/HDL-ON_Android/SplashActivity.cs +++ b/HDL-ON_Android/SplashActivity.cs @@ -199,7 +199,7 @@ { //鍙Е鍙戜竴娆� //Shared.Application.LocationAction = null; - new HDL_ON.DAL.Server.HttpServerRequest().GetCityWeatherInfo(lon.ToString(), lat.ToString()); + new HDL_ON.DAL.Server.HttpServerRequest().GetCityWeatherInfo(lon.ToString().Replace(",", "."), lat.ToString().Replace(",", ".")); } isfirst = false; ///鐩戝惉缁忕含搴� diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs index 0c0bd64..52a4be6 100644 --- a/HDL-ON_iOS/AppDelegate.cs +++ b/HDL-ON_iOS/AppDelegate.cs @@ -233,10 +233,10 @@ { Language.CurrentLanguage = "Czech"; } - else if (NSLocale.PreferredLanguages[0].Contains("ru-")) - { - Language.CurrentLanguage = "russian"; - } + //else if (NSLocale.PreferredLanguages[0].Contains("ru-")) + //{ + // Language.CurrentLanguage = "russian"; + //} else { Language.CurrentLanguage = "English"; diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index b80dc0f..8eded44 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -1385,6 +1385,7 @@ <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg2.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg3.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg4.png" /> + <BundleResource Include="Resources\Phone\Collection\FunctionOfflineBg.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index 312150f..7f88fff 100644 --- a/HDL-ON_iOS/Info.plist +++ b/HDL-ON_iOS/Info.plist @@ -100,9 +100,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> - <string>1.5.402203011</string> + <string>1.5.502203081</string> <key>CFBundleVersion</key> - <string>1.5.403011</string> + <string>1.5.503081</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> diff --git a/HDL-ON_iOS/Main.cs b/HDL-ON_iOS/Main.cs index 1c6b56e..09293dc 100644 --- a/HDL-ON_iOS/Main.cs +++ b/HDL-ON_iOS/Main.cs @@ -16,7 +16,7 @@ try { Shared.Application.LocationAction = null; - new HttpServerRequest().GetCityWeatherInfo(lon.ToString(), lat.ToString()); + new HttpServerRequest().GetCityWeatherInfo(lon.ToString().Replace(",", "."), lat.ToString().Replace(",", ".")); } catch(Exception ex) { diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 80c64ae..56130ad 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -514,7 +514,9 @@ 526=Cancel account 527=Homekit support notes 528=Firmware update - +529= +530=In order to prevent the wrong touch and click of opening and closing the door and ensure family safety, please enter your door lock password. + 1000=Room Humidity 1001=V-chip 1002=Anion @@ -1650,6 +1652,9 @@ 526=娉ㄩ攢璐﹀彿 527=鏀寔HomeKit璇存槑 528=鍥轰欢鏇存柊 +529= +530=涓洪槻姝㈠紑鍏抽棬鐨勮瑙︾偣鍑伙紝淇濊瘉瀹跺涵瀹夊叏锛岃杈撳叆鎮ㄧ殑闂ㄩ攣寮�闂ㄥ瘑鐮併�� +531=浜斿垎閽熷唴鍏嶅瘑鐮佸紑閿� 1000=瀹ゅ唴婀垮害 1001=绔ラ攣 @@ -2768,6 +2773,8 @@ 526=邪薪薪褍谢懈褉芯胁邪褌褜 褋褔褢褌 527=懈薪褋褌褉褍泻褑懈褟 锌芯 锌芯写写械褉卸泻械 薪邪斜芯褉邪 懈薪褋褌褉褍屑械薪褌邪谢褜薪褘褏 褋褉械写褋褌胁 写谢褟 褋械屑械泄 528=芯斜薪芯胁谢械薪懈械 锌褉芯褕懈胁泻懈 +529= +530=In order to prevent the wrong touch and click of opening and closing the door and ensure family safety, please enter your door lock password. 1000=袙谢邪卸薪芯褋褌褜 胁 袩芯屑械褖械薪懈懈 1001=V-芯斜褉邪蟹薪褘泄 褔懈锌 diff --git a/HDL-ON_iOS/Resources/Phone/Collection/FunctionOfflineBg.png b/HDL-ON_iOS/Resources/Phone/Collection/FunctionOfflineBg.png new file mode 100644 index 0000000..bc09c9b --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/Collection/FunctionOfflineBg.png Binary files differ diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index a645c6e..bb6fa70 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -5,6 +5,18 @@ public static class StringId { /// <summary> + /// 浜斿垎閽熷唴鍏嶅瘑鐮佸紑閿� + /// </summary> + public const int DoorLock5minTip = 531; + /// <summary> + /// 涓洪槻姝㈠紑鍏抽棬鐨勮瑙︾偣鍑伙紝淇濊瘉瀹跺涵瀹夊叏锛岃杈撳叆鎮ㄧ殑闂ㄩ攣寮�闂ㄥ瘑鐮併�� + /// </summary> + public const int DoorLockEntryPasswordTip = 530; + /// <summary> + /// 瀵嗙爜杈撳叆 + /// </summary> + public const int EntryPassword = 529; + /// <summary> /// 鍥轰欢鏇存柊 /// </summary> public const int FirmwareUpdate = 528; diff --git a/HDL_ON/Common/UserInfo.cs b/HDL_ON/Common/UserInfo.cs index c82538d..2f98571 100644 --- a/HDL_ON/Common/UserInfo.cs +++ b/HDL_ON/Common/UserInfo.cs @@ -160,6 +160,18 @@ } } + [Newtonsoft.Json.JsonIgnore] + public DateTime LastTimeOpenDoor = DateTime.MinValue; + public bool VerOpenDoorPw + { + get + { + return (DateTime.Now - LastTime).TotalMinutes > 5; + } + } + [Newtonsoft.Json.JsonIgnore] + public string doorPasswordString; + #endregion /// <summary> diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 4917487..72fa068 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -17,8 +17,8 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm + //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary> diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index ca8413a..b64d1e6 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -716,12 +716,8 @@ sendDataObj.time_stamp = Utlis.GetTimestamp(); var acd = new AlinkDoorlockStatus(); acd.sid = sid; - acd.user_id = userId; + acd.user_id = extStr; acd.ext_str = extStr; -#if DEBUG - acd.user_id = "013"; - acd.ext_str = "999999"; -#endif sendDataObj.objects.Add(acd); return sendDataObj; } diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems index ba846b9..f17e8e8 100644 --- a/HDL_ON/HDL_ON.projitems +++ b/HDL_ON/HDL_ON.projitems @@ -488,6 +488,7 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Music\MusicProperty.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\SupportHomeKitNotesPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\FirmwareUpdateView.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockUnlockPage.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" /> diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index 31b908a..ca2d757 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -202,6 +202,7 @@ btnIcon.MouseUpEventHandler += (sender, e) => { + //ESOnVideo.Current.Test(false); //return; @@ -243,8 +244,8 @@ //etAccount.Text = "info@smartlife-ks.com"; //etAccount.Text = "551775569@qq.com";//wcf etAccount.Text = "15626203746"; - etAccount.Text = "zhangquansongjava@163.com"; - etAccount.Text = "s.savinov@hdlautomation.ru"; + //etAccount.Text = "zhangquansongjava@163.com"; + //etAccount.Text = "s.savinov@hdlautomation.ru"; } b = !b; etPassword.Text = "123456"; diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index bed8a4e..7d7fdbe 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -193,6 +193,19 @@ #if DEBUG btnResidenceName.MouseUpEventHandler = (sender, e) => { + + if (UserInfo.Current.VerOpenDoorPw || string.IsNullOrEmpty(UserInfo.Current.doorPasswordString)) + { + var page = new DoorLockUnlockPage(new Function()); + MainPage.BasePageView.AddChidren(page); + page.LoadView(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + } + else + { + Control.Ins.OneKeyUnlocking(new Function(), UserInfo.Current.doorPasswordString); + } + }; #endif @@ -924,6 +937,12 @@ functionViews.Add(functionView); LoadDeviceFunctionDiv(functionView, function); index++; + + + if (!function.online) + { + btnbg.UnSelectedImagePath = "Collection/FunctionOfflineBg.png"; + } } if (index == 0) @@ -1306,6 +1325,23 @@ { UpdataFunctionStates(function); } + + + if (!function.online) + { + var btnOffline = new Button() + { + X = btnIcon.Right, + Y = Application.GetRealWidth(16), + Height = Application.GetMinRealAverage(32), + TextID = StringId.DeviceOffline, + TextColor = CSS_Color.WarningColor, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextAlignment = TextAlignment.CenterLeft + }; + view.AddChidren(btnOffline); + + } } catch (Exception ex) { diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs index 43a2944..8b19f2a 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs @@ -342,6 +342,11 @@ { if (view.Tag.ToString() == function.sid) { + //if (!function.online) + //{ + // view.UnSelectedImagePath = "Collection/FunctionOfflineBg.png"; + //} + var state = false; if (function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || function.spk == SPK.CurtainTrietex || function.spk == SPK.CurtainSwitch)//绐楀笜璁惧鏍规嵁鐧惧垎姣斿垽鏂紑鍏崇姸鎬� diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs index 86d9ff5..098b041 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs @@ -160,6 +160,8 @@ LoadEvent_DivSkipEvent(); LoadEvent_FunctionCollection(); + + } /// <summary> @@ -216,6 +218,22 @@ { bodyDiv.AddChidren(btnCollectionIcon); } + + if (!function.online) + { + bodyDiv.BackgroundColor = CSS_Color.PromptingColor2; + var btnOffline = new Button() + { + X = Application.GetRealWidth(8 + 10 + 32), + Y = Application.GetRealHeight(28 + 24), + Height = Application.GetRealHeight(30), + TextID = StringId.DeviceOffline, + TextColor = CSS_Color.WarningColor, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextAlignment = TextAlignment.CenterLeft + }; + bodyDiv.AddChidren(btnOffline); + } } /// <summary> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs index 9b788f2..4d222e3 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -885,9 +885,9 @@ continue; } //鑷姩鍖栭厤缃緭鍏ユ潯浠剁含搴� - double lat = Convert.ToDouble(logicDate.geo_fence.latitude); + double lat = Convert.ToDouble(logicDate.geo_fence.latitude.Replace(",", ".")); //鑷姩鍖栭厤缃緭鍏ユ潯浠剁粡搴� - double lon = Convert.ToDouble(logicDate.geo_fence.longitude); + double lon = Convert.ToDouble(logicDate.geo_fence.longitude.Replace(",", ".")); //鑷姩鍖栭厤缃緭鍏ユ潯浠�<鍦扮悊鍥存爮鍗婂緞><鍗曚綅锛屽叕閲屻�佸崈绫�.绫�> int radius = int.Parse(logicDate.geo_fence.radius); //璁$畻2涓粡绾害涔嬮棿鐨勮窛绂� diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs index e683de0..83bbe40 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs @@ -118,7 +118,7 @@ /// </summary> private void InitFrameWhiteContent1() { - temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)); + temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); arcBar = new DiyArcSeekBar() { Gravity = Gravity.CenterHorizontal, @@ -147,7 +147,7 @@ arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off"; arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min; arcBar.MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max; - arcBar.Progress = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)); + arcBar.Progress = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); btnTemp = new Button() { @@ -158,7 +158,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 50, IsBold = true, - Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(), + Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(), TextAlignment = TextAlignment.Center, }; FrameWhiteCentet1.AddChidren(btnTemp); @@ -976,14 +976,14 @@ } else { - btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp))) + "掳C"; + btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C"; btnMode.SelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)); btnSwing.SelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing)); btnWindSpeed.SelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed)); btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode), false); btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing), false); btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed), false); - temp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp))); + temp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."))); arcBar.Progress = temp; diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs index 07ee250..9bb66af 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs @@ -460,9 +460,9 @@ Application.RunOnMainThread(() => { btnTemp.Text = device.GetAttrState(FunctionAttributeKey.SetTemp); - btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp))) + "掳C"; + btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C"; btnMode.UnSelectedImagePath = fhTemp.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)); - arcBar.Progress = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp))); + arcBar.Progress = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."))); if (device.trait_on_off.curValue.ToString() == "on") { arcBar.IsOffline = false; diff --git a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs index 345f80f..cf582a2 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs @@ -155,7 +155,7 @@ MaxValue = function.GetAttribute(FunctionAttributeKey.SetTemp).max, //IsClickable = function.trait_on_off.curValue.ToString() == "on", ArcColor = CSS_Color.BackgroundColor, - Progress = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)), + Progress = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",",".")), #if __IOS__ Y = Application.GetRealHeight(120 + 25), Width = Application.GetRealWidth(260 - 40), @@ -180,7 +180,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 50, IsBold = true, - Text = Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(), + Text = Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(), TextAlignment = TextAlignment.Center, }; controlView.AddChidren(btnTemp); diff --git a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs index 805a2ac..8c9dd0a 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs @@ -25,11 +25,11 @@ } AC temp = new AC(); updataTime = DateTime.Now; - bodyView.btnTemp.Text = Convert.ToDouble( updateTemp.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(); - bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState((string)FunctionAttributeKey.RoomTemp))) + "掳C"; + bodyView.btnTemp.Text = Convert.ToDouble( updateTemp.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(); + bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C"; bodyView.btnMode.UnSelectedImagePath = temp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode)); bodyView.btnWindSpeed.UnSelectedImagePath = temp.GetFanIconPath(updateTemp.GetAttrState(FunctionAttributeKey.FanSpeed)); - bodyView.arcBar.Progress = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp))); + bodyView.arcBar.Progress = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."))); if (updateTemp.trait_on_off.curValue.ToString() == "on") { bodyView.arcBar.IsOffline = false; @@ -96,7 +96,7 @@ { return; } - var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)); + var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); if (temp <= function.GetAttribute(FunctionAttributeKey.Mode).min) { return; @@ -116,7 +116,7 @@ { return; } - var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)); + var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); if (temp >= function.GetAttribute(FunctionAttributeKey.SetTemp).max) { return; diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs index 6d6f61d..0376173 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs @@ -911,7 +911,17 @@ HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipRemind, Language.StringByID(StringId.DeviceNotOnline), null, null, null, 2); return; } - Control.Ins.OneKeyUnlocking(this.device, this.device.GetAttrState("key")); + if (UserInfo.Current.VerOpenDoorPw || string.IsNullOrEmpty(UserInfo.Current.doorPasswordString)) + { + var page = new DoorLockUnlockPage(this.device); + MainPage.BasePageView.AddChidren(page); + page.LoadView(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + } + else + { + Control.Ins.OneKeyUnlocking(this.device, UserInfo.Current.doorPasswordString); + } //绗竴娆′娇鐢紝璇峰厛缁戝畾闂ㄩ攣瀵嗙爜 //HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.PleaseBindTheDoorPswFirst), () => //{ diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs new file mode 100644 index 0000000..aa4216d --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs @@ -0,0 +1,193 @@ +锘縰sing System; +using HDL_ON.DriverLayer; +using HDL_ON.Entity; +using HDL_ON.Stan; +using HDL_ON.UI.CSS; +using Shared; +namespace HDL_ON.UI +{ + public class DoorLockUnlockPage : FrameLayout + { + /// <summary> + /// 褰撳墠鐣岄潰 + /// </summary> + FrameLayout bodyView; + + Function device; + + public DoorLockUnlockPage(Function function) + { + bodyView = this; + device = function; + } + + /// <summary> + /// 鍔犺浇瑙嗗浘 + /// </summary> + public void LoadView() + { + + new TopViewDiv(bodyView, Language.StringByID(StringId.PlsEntryPassword)).LoadTopView(); + bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; + + + var btnMsg = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(100), + Width = Application.GetRealWidth(300), + Height = Application.GetRealHeight(100), + TextAlignment = TextAlignment.TopCenter, + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.TextFontSize, + TextID = StringId.DoorLockEntryPasswordTip, + IsMoreLines = true, + }; + bodyView.AddChidren(btnMsg); + + #region 瀵嗙爜濉啓 + var passwordView = new FrameLayout() + { + X = Application.GetRealWidth(28), + Y = Application.GetRealHeight(200), + Width = Application.GetRealWidth(319), + Height = Application.GetRealHeight(44), + }; + bodyView.AddChidren(passwordView); + + + var etPassword = new EditText() + { + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.TextFontSize, + PlaceholderTextColor = CSS_Color.PromptingColor1, + PlaceholderText = Language.StringByID(StringId.PlsEntryPassword), + SecureTextEntry = true, + TextAlignment = TextAlignment.Center, + BackgroundColor = CSS_Color.BackgroundColor, + IsNumberKeyboardType = true + }; + passwordView.AddChidren(etPassword); + + //var btnVisiblePassword = new Button() + //{ + // X = Application.GetRealWidth(273), + // Gravity = Gravity.CenterVertical, + // Width = Application.GetMinRealAverage(20), + // Height = Application.GetMinRealAverage(20), + // UnSelectedImagePath = "LoginIcon/HidePasswordIcon.png", + // SelectedImagePath = "LoginIcon/ShowPasswordIcon.png", + //}; + //passwordView.AddChidren(btnVisiblePassword); + + #endregion + + + + var frameRow = new FrameLayout() + { + Height = Application.GetRealHeight(28), + Y = Application.GetRealHeight(258),//375 // 667 + }; + bodyView.AddChidren(frameRow); + + //鍚屾剰鎸夐挳鑳屾櫙 + var agreeView = new FrameLayout() + { + Height = Application.GetRealHeight(28), + Width = Application.GetRealWidth(28), + X = Application.GetRealWidth(22), + }; + frameRow.AddChidren(agreeView); + + //鍚屾剰鍥炬爣鎸夐挳 + var agreeBtn = new Button() + { + Width = Application.GetMinRealAverage(28), + Height = Application.GetMinRealAverage(28), + UnSelectedImagePath = "Public/ChooseIcon.png", + SelectedImagePath = "Public/ChooseOnIcon.png", + IsSelected = OnAppConfig.Instance.isAgreePrivacyPolicy, + Gravity = Gravity.Center + }; + agreeView.AddChidren(agreeBtn); + + var agreeTextBtn = new TextButton() + { + X = agreeView.Right, + Width = Application.GetRealWidth(28), + Height = Application.GetRealHeight(28), + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextID = StringId.DoorLock5minTip + }; + frameRow.AddChidren(agreeTextBtn); + agreeTextBtn.Width = Utlis.GetRealWidthByTextButton(agreeTextBtn); + + EventHandler<MouseEventArgs> eventHandler = (sender, e) => + { + agreeBtn.IsSelected = !agreeBtn.IsSelected; + }; + + agreeBtn.MouseUpEventHandler = eventHandler; + agreeView.MouseUpEventHandler = eventHandler; + agreeTextBtn.MouseUpEventHandler = eventHandler; + + + Button btnLine = new Button() + { + Y = Application.GetRealHeight(607), + Height = Application.GetRealHeight(1), + BackgroundColor = CSS.CSS_Color.DividingLineColor, + }; + bodyView.AddChidren(btnLine); + + Button btnCancel = new Button() + { + Y = btnLine.Bottom, + Width = Application.GetRealWidth(374/2), + Height = Application.GetRealHeight(60), + TextAlignment = TextAlignment.Center, + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = StringId.Cancel, + }; + bodyView.AddChidren(btnCancel); + btnCancel.MouseUpEventHandler = (sender, e) => { + this.RemoveFromParent(); + }; + + Button btnConfirm = new Button() + { + X = btnCancel.Right, + Y = btnLine.Y, + Width = Application.GetRealWidth(376 / 2), + Height = Application.GetRealHeight(60), + TextAlignment = TextAlignment.Center, + //TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextColor = CSS_Color.MainBackgroundColor, + BackgroundColor = CSS_Color.MainColor, + TextID = StringId.Confirm, + }; + bodyView.AddChidren(btnConfirm); + btnConfirm.MouseUpEventHandler = (sender, e) => { + var password = etPassword.Text.Trim(); + if (password.Length == 0) + { + //璁惧涓嶅湪绾� + HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipRemind, Language.StringByID(StringId.PlsEntryPassword), null, null, null, 2); + return; + } + if (agreeBtn.IsSelected) + { + UserInfo.Current.doorPasswordString = password; + } + Control.Ins.OneKeyUnlocking(this.device, etPassword.Text.Trim()); + this.RemoveFromParent(); + }; + + } + + } +} \ No newline at end of file diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs index 967b540..cf7936f 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs @@ -713,7 +713,7 @@ sensorSPK = showList[0].spk; foreach (var s in showList) { - assembleValues += Convert.ToDouble(s.GetAttrState("value")); + assembleValues += Convert.ToDouble(s.GetAttrState("value").Replace(",", ".")); } @@ -1011,7 +1011,7 @@ assembleValues = 0; foreach (var s in sensorList) { - assembleValues += Convert.ToDouble(s.GetAttrState("value")); + assembleValues += Convert.ToDouble(s.GetAttrState("value").Replace(",", ".")); } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs index 5a8281e..38fb12f 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs @@ -19,9 +19,9 @@ { return; } - var outinTemp = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp))); + var outinTemp = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."))); bodyView.btnTemp.Text = outinTemp.ToString(); - bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp))) + "掳C"; + bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C"; bodyView.btnMode.SelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode)); bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode),false); bodyView.arcBar.Progress = outinTemp; @@ -136,7 +136,7 @@ return; } - var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)); + var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); if (temp <= Convert.ToInt32(function.GetAttribute(FunctionAttributeKey.SetTemp).min)) { return; @@ -156,7 +156,7 @@ { return; } - var temp =(int) Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)); + var temp =(int) Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); if (temp >= Convert.ToDouble(function.GetAttribute(FunctionAttributeKey.SetTemp).max)) { return; @@ -181,7 +181,7 @@ arcBar.OnProgressChangedEvent = (sender, e) => { function.SetAttrState(FunctionAttributeKey.SetTemp, e); - btnTemp.Text = Convert.ToDouble( function.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(); + btnTemp.Text = Convert.ToDouble( function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(); }; } /// <summary> diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs index f61de04..56a78a0 100644 --- a/SiriIntents/Server/HttpUtil.cs +++ b/SiriIntents/Server/HttpUtil.cs @@ -16,8 +16,8 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm + //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary> -- Gitblit v1.8.0