From 58e4fcd8dfe45102fb9132f1bf64343bd9379c8d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 28 十月 2022 13:27:36 +0800 Subject: [PATCH] Merge branch 'dev--wxr' into LcSdkV1 --- HDL-ON_Android/Properties/AndroidManifest.xml | 2 HDL-ON_Android/Assets/Language.ini | 6 HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 2 HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs | 806 ++++++++++++++++++++++++++++------------------------- HDL-ON_Android/SplashActivity.cs | 1 HDL-ON_iOS/Info.plist | 4 HDL-ON_iOS/Resources/Language.ini | 6 HDL_ON/Entity/Function/Function.cs | 14 HDL_ON/DAL/Server/HttpUtil.cs | 4 HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs | 4 HDL_ON/UI/MainPage.cs | 2 HDL_ON/UI/UI1-Login/LoginPage.cs | 6 SiriIntents/Server/HttpUtil.cs | 4 13 files changed, 467 insertions(+), 394 deletions(-) diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 2d60a36..f8cbefa 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -2471,7 +2471,7 @@ 39=袠薪写懈胁懈写褍邪谢褜薪褘泄 40=袧械褍褋锌械褕薪邪褟 邪胁褌芯褉懈蟹邪褑懈褟, 薪械胁械褉薪邪 褍褔械褌薪邪褟 蟹邪锌懈褋褜 懈谢懈 锌邪褉芯谢褜 41=袧械 褍写邪谢芯褋褜 芯褌锌褉邪胁懈褌褜 锌褉芯胁械褉芯褔薪褘泄 泻芯写 -42=Disconnected from gateway +42=袨褌泻谢褞褔械薪芯 褋芯械写懈薪械薪懈械 褋 褕谢褞蟹芯屑 43=袧械 褍写邪谢芯褋褜 蟹邪褉械谐懈褋褌褉懈褉芯胁邪褌褜褋褟 44=袩芯写褌胁械褉写懈褌械 褋斜褉芯褋 45=校褔械褌薪邪褟 蟹邪锌懈褋褜 薪械 褋褍褖械褋褌胁褍械褌, 锌褉芯胁械褉褜褌械 褔褌芯 芯薪邪 蟹邪褉械谐懈褋褌褉懈褉芯胁邪薪邪 @@ -2959,7 +2959,7 @@ 545=Alarm data statistics 546=Laboratory mode 547=Alarm function -548=Indoor +548=孝械泻. 褌械屑锌-褉邪 549=Surface temperature 550=Temperature calibration 551=Humidity calibration @@ -5525,7 +5525,7 @@ 1125=袠薪褎芯褉屑邪褑懈褟 蟹邪 邪谢邪褉屑邪 1126=袨褌泻谢褞褔懈 1127=袗谢邪褉屑邪 -1128=校褋褌褉芯泄褋褌胁芯褌芯 械 芯褎谢邪泄薪 +1128=芯褎谢邪泄薪 1129=袟邪 锌褗褉胁懈 锌褗褌, 屑芯谢褟, 褋胁褗褉卸械褌械 锌褗褉胁芯 锌邪褉芯谢邪褌邪 蟹邪 蟹邪泻谢褞褔胁邪薪械 薪邪 胁褉邪褌邪褌邪 1130=袦芯谢褟, 胁褗胁械写械褌械 邪写屑懈薪懈褋褌褉邪褌芯褉褋泻邪褌邪 锌邪褉芯谢邪 蟹邪 蟹邪泻谢褞褔胁邪薪械 薪邪 胁褉邪褌邪褌邪 1131=袙褉邪褌邪褌邪 械 褍褋锌械褕薪芯 蟹邪泻谢褞褔械薪邪 diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index 97ae8a0..67844c0 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.6.1" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202210181"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.6.2" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202210281"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <!--鍙嬬洘--> <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs index 07a8b17..54eae56 100644 --- a/HDL-ON_Android/SplashActivity.cs +++ b/HDL-ON_Android/SplashActivity.cs @@ -60,6 +60,7 @@ Language.CurrentLanguage = "Chinese"; Locale locale1 = Locale.Default; var localeList = Resources.Configuration.Locale; + Console.WriteLine("褰撳墠璇█缂╁啓:"+localeList.Language); if (localeList.Language == "zh") { Language.CurrentLanguage = "Chinese"; diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index 3daaf41..ed71fc1 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.6.102210131</string> + <string>1.6.202210281</string> <key>CFBundleVersion</key> - <string>1.6.110131</string> + <string>1.6.210281</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 2d60a36..f8cbefa 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -2471,7 +2471,7 @@ 39=袠薪写懈胁懈写褍邪谢褜薪褘泄 40=袧械褍褋锌械褕薪邪褟 邪胁褌芯褉懈蟹邪褑懈褟, 薪械胁械褉薪邪 褍褔械褌薪邪褟 蟹邪锌懈褋褜 懈谢懈 锌邪褉芯谢褜 41=袧械 褍写邪谢芯褋褜 芯褌锌褉邪胁懈褌褜 锌褉芯胁械褉芯褔薪褘泄 泻芯写 -42=Disconnected from gateway +42=袨褌泻谢褞褔械薪芯 褋芯械写懈薪械薪懈械 褋 褕谢褞蟹芯屑 43=袧械 褍写邪谢芯褋褜 蟹邪褉械谐懈褋褌褉懈褉芯胁邪褌褜褋褟 44=袩芯写褌胁械褉写懈褌械 褋斜褉芯褋 45=校褔械褌薪邪褟 蟹邪锌懈褋褜 薪械 褋褍褖械褋褌胁褍械褌, 锌褉芯胁械褉褜褌械 褔褌芯 芯薪邪 蟹邪褉械谐懈褋褌褉懈褉芯胁邪薪邪 @@ -2959,7 +2959,7 @@ 545=Alarm data statistics 546=Laboratory mode 547=Alarm function -548=Indoor +548=孝械泻. 褌械屑锌-褉邪 549=Surface temperature 550=Temperature calibration 551=Humidity calibration @@ -5525,7 +5525,7 @@ 1125=袠薪褎芯褉屑邪褑懈褟 蟹邪 邪谢邪褉屑邪 1126=袨褌泻谢褞褔懈 1127=袗谢邪褉屑邪 -1128=校褋褌褉芯泄褋褌胁芯褌芯 械 芯褎谢邪泄薪 +1128=芯褎谢邪泄薪 1129=袟邪 锌褗褉胁懈 锌褗褌, 屑芯谢褟, 褋胁褗褉卸械褌械 锌褗褉胁芯 锌邪褉芯谢邪褌邪 蟹邪 蟹邪泻谢褞褔胁邪薪械 薪邪 胁褉邪褌邪褌邪 1130=袦芯谢褟, 胁褗胁械写械褌械 邪写屑懈薪懈褋褌褉邪褌芯褉褋泻邪褌邪 锌邪褉芯谢邪 蟹邪 蟹邪泻谢褞褔胁邪薪械 薪邪 胁褉邪褌邪褌邪 1131=袙褉邪褌邪褌邪 械 褍褋锌械褕薪芯 蟹邪泻谢褞褔械薪邪 diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index bf39c96..511a91e 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 b23b328..3f7a233 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -400,10 +400,22 @@ /// 鏄惁鏀惰棌 /// </summary> public bool collect = false; + + private bool _online = false; /// <summary> /// 鏄惁鍦ㄧ嚎 /// </summary> - public bool online = true; + public bool online + { + get + { + return true; + } + set + { + _online = value; + } + } /// <summary> /// 鐜闈㈡澘 缁戝畾鐨� 璁惧鐩爣sid鍒楄〃 diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index b1d3435..4fd5acb 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -26,7 +26,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string VersionString = "1.6.1"; + public static string VersionString = "1.6.2"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index 47320de..22ff68e 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -218,7 +218,7 @@ etAccount.Text = "18244942707"; etAccount.Text = "tf@smarttech.com.ua"; etAccount.Text = "13288623489"; - etAccount.Text = "13535293836"; + etAccount.Text = "455740454@qq.com"; } else { @@ -252,9 +252,9 @@ } b = !b; etPassword.Text = "123456"; - if(etAccount.Text == "13535293836") + if(etAccount.Text == "455740454@qq.com") { - etPassword.Text = "shan1987"; + etPassword.Text = "a123456"; } //etPassword.Text = "Hdl85521566"; btnLogin.IsSelected = true; diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs index 68485bc..ac508a3 100644 --- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs @@ -1346,7 +1346,7 @@ { lz = "en"; } - string url = $"h5/index.html?homeId={DB_ResidenceData.Instance.CurrentRegion.id}&token={UserInfo.Current.AccessToken}&refresh_token={UserInfo.Current.RefreshToken}&url={HttpUtil.GlobalRequestHttpsHost}&language={lz}"; + string url = $"h5/index.html?homeId={DB_ResidenceData.Instance.CurrentRegion.id}&token={UserInfo.Current.AccessToken}&refresh_token={UserInfo.Current.RefreshToken}&url={OnAppConfig.Instance.RequestHttpsHost}&language={lz}"; Inverter.Ins.ShowWebviewFormUrl(url); Inverter.Ins.H5Page.JSToNativeAction = (dictionary) => diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs index 3887a17..3c86be0 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs @@ -257,6 +257,10 @@ { btnExit.Text = "閫�鍑�"; } + //else if (Language.CurrentLanguage == "russian") + //{ + // btnExit.Text = "胁褘褏芯写"; + //} else { btnExit.Text = "Exit"; diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs index 774698a..8f2b256 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs @@ -160,7 +160,7 @@ basePage.btnWorkSceneControl.SelectedImagePath = $"FunctionIcon/Acst/{basePage.imageFolder}/SceneSleepIcon2.png"; break; } - basePage.btnModeControl.IsSelected = basePage.btnWorkSceneControl.IsSelected = basePage.btnPowerControl.IsSelected = temp.trait_on_off.state == "on"; + basePage.btnModeControl.IsSelected = basePage.btnWorkSceneControl.IsSelected = basePage.btnPowerControl.IsSelected = temp.GetAttrState("on_off") == "on"; }); } @@ -359,24 +359,8 @@ }); #region 鏁版嵁 - var infoView = new FrameLayout() - { - Y = topView.Bottom, - Height = Application.GetRealHeight(104), - BackgroundColor = CSS.CSS_Color.MainBackgroundColor, - }; - bodyView.AddChidren(infoView); - var infoContentView = new FrameLayout() - { - Gravity = Gravity.Center, - Width = Application.GetRealWidth(343), - Height = Application.GetRealHeight(72), - BackgroundImagePath = $"FunctionIcon/Acst/{imageFolder}/MsgViewBg.png", - }; - infoView.AddChidren(infoContentView); - - #region 浼犳劅鍣ㄦ暟鎹� + #region 浼犳劅鍣ㄦ暟鎹�昏 int sensorCount = 0; var tempObj = function.GetAttribute(AcstParent_AttrEnum.room_temp.ToString()); if (tempObj != null) @@ -403,40 +387,10 @@ { sensorCount++; } - - var sensorListView = new HorizontalScrolViewLayout() - { - Width = Application.GetRealWidth(60 * sensorCount), - Gravity = Gravity.Center, - }; - if (sensorCount > 0) - { - infoContentView.AddChidren(sensorListView); - } - - if (tempObj != null) - { - sensorDiyView_Temp = new SensorDiyView(sensorListView, curColor, tempObj.state == "" ? "--" : tempObj.state, "掳", Language.StringByID(StringId.Temp)); - } - if (humiObj != null) - { - sensorDiyView_Humi = new SensorDiyView(sensorListView, curColor, humiObj.state == "" ? "--" : humiObj.state, "%", Language.StringByID(StringId.Humidity)); - } - if (pm25Obj != null) - { - sensorDiyView_Pm25 = new SensorDiyView(sensorListView, curColor, pm25Obj.state == "" ? "--" : pm25Obj.state, "", "PM2.5"); - } - if (co2Obj != null) - { - sensorDiyView_Co2 = new SensorDiyView(sensorListView, curColor, co2Obj.state == "" ? "--" : co2Obj.state, "", "CO2"); - } - if (tvocObj != null) - { - sensorDiyView_Tvoc = new SensorDiyView(sensorListView, curColor, tvocObj.state == "" ? "--" : tvocObj.state, "", "TVOC"); - } #endregion - #region 鑳借�楁暟鎹� + + #region 鑳借�楁暟鎹粺璁� int energyCount = 0; var totalObj = function.GetAttribute(AcstParent_AttrEnum.active_power.ToString()); if (totalObj != null) @@ -453,71 +407,128 @@ { energyCount++; } - var energyListView = new HorizontalScrolViewLayout() - { - Width = Application.GetRealWidth(100 * energyCount), - Gravity = Gravity.Center, - Visible = false, - }; - if (energyCount > 0) - { - infoContentView.AddChidren(energyListView); - } - if (totalObj != null) - { - string text = "鐢ㄧ數鍔熺巼"; - if (Language.CurrentLanguage != "Chinese") - { - text = "Power"; - } - - sensorDiyView_EleActivePower = new SensorDiyView(energyListView, curColor, totalObj.state == "" ? "--" : totalObj.state , "KW", text, 100); - } - if (dayObj != null) - { - string text = "浠婃棩鑰楃數"; - if (Language.CurrentLanguage != "Chinese") - { - text = "Power of today"; - } - sensorDiyView_EleDay = new SensorDiyView(energyListView, curColor, dayObj.state == "" ? "--" : dayObj.state , "KW", text,100); - } - if (monthObj != null) - { - string text = "鏈湀鑰楃數"; - if (Language.CurrentLanguage != "Chinese") - { - text = "Power of month"; - } - sensorDiyView_EleMonth = new SensorDiyView(energyListView, curColor, monthObj.state == "" ? "--" : monthObj.state , "KWh", text, 100); - } - - - var btnChangeClick = new Button(); - infoView.AddChidren(btnChangeClick); - - bool showSensor = true; - EventHandler<MouseEventArgs> changeInfoEvent = (sender, e) => { - if (showSensor) - { - sensorListView.Visible = false; - showSensor = false; - energyListView.Visible = true; - } - else - { - sensorListView.Visible = true; - showSensor = true; - energyListView.Visible = false; - } - }; - if (sensorCount > 0 && energyCount > 0) - { - btnChangeClick.MouseUpEventHandler = changeInfoEvent; - } - #endregion + if (energyCount > 0 || sensorCount > 0) + { + var infoView = new FrameLayout() + { + Y = topView.Bottom, + Height = Application.GetRealHeight(104), + BackgroundColor = CSS.CSS_Color.MainBackgroundColor, + }; + bodyView.AddChidren(infoView); + + var infoContentView = new FrameLayout() + { + Gravity = Gravity.Center, + Width = Application.GetRealWidth(343), + Height = Application.GetRealHeight(72), + BackgroundImagePath = $"FunctionIcon/Acst/{imageFolder}/MsgViewBg.png", + }; + infoView.AddChidren(infoContentView); + + #region 浼犳劅鍣ㄦ暟鎹� + + var sensorListView = new HorizontalScrolViewLayout() + { + Width = Application.GetRealWidth(60 * sensorCount), + Gravity = Gravity.Center, + }; + if (sensorCount > 0) + { + infoContentView.AddChidren(sensorListView); + } + + if (tempObj != null) + { + sensorDiyView_Temp = new SensorDiyView(sensorListView, curColor, tempObj.state == "" ? "--" : tempObj.state, "掳", Language.StringByID(StringId.Temp)); + } + if (humiObj != null) + { + sensorDiyView_Humi = new SensorDiyView(sensorListView, curColor, humiObj.state == "" ? "--" : humiObj.state, "%", Language.StringByID(StringId.Humidity)); + } + if (pm25Obj != null) + { + sensorDiyView_Pm25 = new SensorDiyView(sensorListView, curColor, pm25Obj.state == "" ? "--" : pm25Obj.state, "", "PM2.5"); + } + if (co2Obj != null) + { + sensorDiyView_Co2 = new SensorDiyView(sensorListView, curColor, co2Obj.state == "" ? "--" : co2Obj.state, "", "CO2"); + } + if (tvocObj != null) + { + sensorDiyView_Tvoc = new SensorDiyView(sensorListView, curColor, tvocObj.state == "" ? "--" : tvocObj.state, "", "TVOC"); + } + #endregion + + #region 鑳借�楁暟鎹� + var energyListView = new HorizontalScrolViewLayout() + { + Width = Application.GetRealWidth(100 * energyCount), + Gravity = Gravity.Center, + Visible = false, + }; + if (energyCount > 0) + { + infoContentView.AddChidren(energyListView); + } + if (totalObj != null) + { + string text = "鐢ㄧ數鍔熺巼"; + if (Language.CurrentLanguage != "Chinese") + { + text = "Power"; + } + + sensorDiyView_EleActivePower = new SensorDiyView(energyListView, curColor, totalObj.state == "" ? "--" : totalObj.state, "KW", text, 100); + } + if (dayObj != null) + { + string text = "浠婃棩鑰楃數"; + if (Language.CurrentLanguage != "Chinese") + { + text = "Power of today"; + } + sensorDiyView_EleDay = new SensorDiyView(energyListView, curColor, dayObj.state == "" ? "--" : dayObj.state, "KW", text, 100); + } + if (monthObj != null) + { + string text = "鏈湀鑰楃數"; + if (Language.CurrentLanguage != "Chinese") + { + text = "Power of month"; + } + sensorDiyView_EleMonth = new SensorDiyView(energyListView, curColor, monthObj.state == "" ? "--" : monthObj.state, "KWh", text, 100); + } + + + var btnChangeClick = new Button(); + infoView.AddChidren(btnChangeClick); + + bool showSensor = true; + EventHandler<MouseEventArgs> changeInfoEvent = (sender, e) => + { + if (showSensor) + { + sensorListView.Visible = false; + showSensor = false; + energyListView.Visible = true; + } + else + { + sensorListView.Visible = true; + showSensor = true; + energyListView.Visible = false; + } + }; + if (sensorCount > 0 && energyCount > 0) + { + btnChangeClick.MouseUpEventHandler = changeInfoEvent; + } + + #endregion + } #endregion #region 瀛愭帶鍒楄〃 @@ -644,7 +655,7 @@ dialog.Close(); }; - var dialogContentView = new FrameLayout() { + var dialogContentView = new VerticalScrolViewLayout() { X = Application.GetRealWidth(34), Y = Application.GetRealHeight(291), Width = Application.GetRealWidth(148), @@ -672,191 +683,217 @@ }; titleView.AddChidren(btnTitleText); - #region 鍒跺喎 - var coolView = new FrameLayout() + if (function.GetAttribute(AcstParent_AttrEnum.mode.ToString()).value.Contains(AcstParent_Attr_ModeValueEnum.cool.ToString())) { - X = Application.GetRealWidth(2), - Y = titleView.Bottom, - Width = Application.GetRealWidth(144), - Height = Application.GetRealHeight(44), - }; - dialogContentView.AddChidren(coolView); - coolView.AddChidren(new Button - { - Width = Application.GetRealWidth(112), - Gravity = Gravity.CenterHorizontal, - Height = 1, - BackgroundColor = CSS.CSS_Color.DividingLineColor, - }); - IconButton coolIconButton = new IconButton("FunctionIcon/Acst/grey/ModeCoolIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeCoolIcon.png", - Language.StringByID(StringId.Cool),curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == "cool"); - coolIconButton.Click(()=> { - dialog.Close(); - btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeCoolIcon2.png"; - new System.Threading.Thread(() => { - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add(AcstParent_AttrEnum.mode.ToString(), AcstParent_Attr_ModeValueEnum.cool.ToString()); - Control.Ins.SendWriteCommand(function, d); - }) { IsBackground = true }.Start(); - }); - coolView.AddChidren(coolIconButton); - #endregion + #region 鍒跺喎 + var coolView = new FrameLayout() + { + X = Application.GetRealWidth(2), + Width = Application.GetRealWidth(144), + Height = Application.GetRealHeight(44), + }; + dialogContentView.AddChidren(coolView); + coolView.AddChidren(new Button + { + Width = Application.GetRealWidth(112), + Gravity = Gravity.CenterHorizontal, + Height = 1, + BackgroundColor = CSS.CSS_Color.DividingLineColor, + }); + IconButton coolIconButton = new IconButton("FunctionIcon/Acst/grey/ModeCoolIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeCoolIcon.png", + Language.StringByID(StringId.Cool), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == "cool"); + coolIconButton.Click(() => + { + dialog.Close(); + btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeCoolIcon2.png"; + new System.Threading.Thread(() => + { + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add(AcstParent_AttrEnum.mode.ToString(), AcstParent_Attr_ModeValueEnum.cool.ToString()); + Control.Ins.SendWriteCommand(function, d); + }) + { IsBackground = true }.Start(); + }); + coolView.AddChidren(coolIconButton); + #endregion + } + if (function.GetAttribute(AcstParent_AttrEnum.mode.ToString()).value.Contains(AcstParent_Attr_ModeValueEnum.heat.ToString())) + { + #region 鍒剁儹 + var heatView = new FrameLayout() + { + X = Application.GetRealWidth(2), + Width = Application.GetRealWidth(144), + Height = Application.GetRealHeight(44), + }; + dialogContentView.AddChidren(heatView); + heatView.AddChidren(new Button + { + Width = Application.GetRealWidth(112), + Gravity = Gravity.CenterHorizontal, + Height = 1, + BackgroundColor = CSS.CSS_Color.DividingLineColor, + }); + IconButton heatIconButton = new IconButton("FunctionIcon/Acst/grey/ModeHeatIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeHeatIcon.png", + Language.StringByID(StringId.Heat), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == "heat"); + heatIconButton.Click(() => + { + dialog.Close(); + btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeHeatIcon2.png"; + new System.Threading.Thread(() => + { + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add("mode", "heat"); + Control.Ins.SendWriteCommand(function, d); + }) + { IsBackground = true }.Start(); + }); + heatView.AddChidren(heatIconButton); + #endregion + } + if (function.GetAttribute(AcstParent_AttrEnum.mode.ToString()).value.Contains(AcstParent_Attr_ModeValueEnum.humidity.ToString())) + { - #region 鍒剁儹 - var heatView = new FrameLayout() - { - X = Application.GetRealWidth(2), - Y = coolView.Bottom, - Width = Application.GetRealWidth(144), - Height = Application.GetRealHeight(44), - }; - dialogContentView.AddChidren(heatView); - heatView.AddChidren(new Button - { - Width = Application.GetRealWidth(112), - Gravity = Gravity.CenterHorizontal, - Height = 1, - BackgroundColor = CSS.CSS_Color.DividingLineColor, - }); - IconButton heatIconButton = new IconButton("FunctionIcon/Acst/grey/ModeHeatIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeHeatIcon.png", - Language.StringByID(StringId.Heat), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == "heat"); - heatIconButton.Click(() => { - dialog.Close(); - btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeHeatIcon2.png"; - new System.Threading.Thread(() => { - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add("mode", "heat"); - Control.Ins.SendWriteCommand(function, d); - }) - { IsBackground = true }.Start(); - }); - heatView.AddChidren(heatIconButton); - #endregion + #region 闄ゆ箍 + var dehumiView = new FrameLayout() + { + X = Application.GetRealWidth(2), + Width = Application.GetRealWidth(144), + Height = Application.GetRealHeight(44), + }; + dialogContentView.AddChidren(dehumiView); + dehumiView.AddChidren(new Button + { + Width = Application.GetRealWidth(112), + Gravity = Gravity.CenterHorizontal, + Height = 1, + BackgroundColor = CSS.CSS_Color.DividingLineColor, + }); + IconButton dehumiIconButton = new IconButton("FunctionIcon/Acst/grey/ModeDeHumiIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeDeHumiIcon.png", + Language.StringByID(StringId.Humidity), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.dry.ToString()); + dehumiIconButton.Click(() => + { + btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeDeHumiIcon2.png"; + dialog.Close(); + new System.Threading.Thread(() => + { + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add("mode", AcstParent_Attr_ModeValueEnum.dry.ToString()); + Control.Ins.SendWriteCommand(function, d); + }) + { IsBackground = true }.Start(); + }); + dehumiView.AddChidren(dehumiIconButton); + #endregion + } - #region 闄ゆ箍 - var dehumiView = new FrameLayout() + if (function.GetAttribute(AcstParent_AttrEnum.mode.ToString()).value.Contains(AcstParent_Attr_ModeValueEnum.fan.ToString())) { - X = Application.GetRealWidth(2), - Y = heatView.Bottom, - Width = Application.GetRealWidth(144), - Height = Application.GetRealHeight(44), - }; - dialogContentView.AddChidren(dehumiView); - dehumiView.AddChidren(new Button - { - Width = Application.GetRealWidth(112), - Gravity = Gravity.CenterHorizontal, - Height = 1, - BackgroundColor = CSS.CSS_Color.DividingLineColor, - }); - IconButton dehumiIconButton = new IconButton("FunctionIcon/Acst/grey/ModeDeHumiIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeDeHumiIcon.png", - Language.StringByID(StringId.Humidity), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.dry.ToString()); - dehumiIconButton.Click(() => { - btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeDeHumiIcon2.png"; - dialog.Close(); - new System.Threading.Thread(() => { - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add("mode", AcstParent_Attr_ModeValueEnum.dry.ToString()); - Control.Ins.SendWriteCommand(function, d); - }) - { IsBackground = true }.Start(); - }); - dehumiView.AddChidren(dehumiIconButton); - #endregion + #region 閫氶 + var fanView = new FrameLayout() + { + X = Application.GetRealWidth(2), + Width = Application.GetRealWidth(144), + Height = Application.GetRealHeight(44), + }; + dialogContentView.AddChidren(fanView); + fanView.AddChidren(new Button + { + Width = Application.GetRealWidth(112), + Gravity = Gravity.CenterHorizontal, + Height = 1, + BackgroundColor = CSS.CSS_Color.DividingLineColor, + }); + IconButton fanIconButton = new IconButton("FunctionIcon/Acst/grey/ModeFanIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeFanIcon.png", + Language.StringByID(StringId.Ventilated), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.fan.ToString()); + fanIconButton.Click(() => + { + btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeFanIcon2.png"; + dialog.Close(); + new System.Threading.Thread(() => + { + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add("mode", AcstParent_Attr_ModeValueEnum.fan.ToString()); + Control.Ins.SendWriteCommand(function, d); + }) + { IsBackground = true }.Start(); + }); + fanView.AddChidren(fanIconButton); + #endregion + } - #region 閫氶 - var fanView = new FrameLayout() + if (function.GetAttribute(AcstParent_AttrEnum.mode.ToString()).value.Contains(AcstParent_Attr_ModeValueEnum.heat_humidity.ToString())) { - X = Application.GetRealWidth(2), - Y = dehumiView.Bottom, - Width = Application.GetRealWidth(144), - Height = Application.GetRealHeight(44), - }; - dialogContentView.AddChidren(fanView); - fanView.AddChidren(new Button - { - Width = Application.GetRealWidth(112), - Gravity = Gravity.CenterHorizontal, - Height = 1, - BackgroundColor = CSS.CSS_Color.DividingLineColor, - }); - IconButton fanIconButton = new IconButton("FunctionIcon/Acst/grey/ModeFanIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeFanIcon.png", - Language.StringByID(StringId.Ventilated), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.fan.ToString()); - fanIconButton.Click(() => { - btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeFanIcon2.png"; - dialog.Close(); - new System.Threading.Thread(() => { - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add("mode", AcstParent_Attr_ModeValueEnum.fan.ToString()); - Control.Ins.SendWriteCommand(function, d); - }) - { IsBackground = true }.Start(); - }); - fanView.AddChidren(fanIconButton); - #endregion - #region 鍒剁儹闄ゆ箍 - var heatHumiView = new FrameLayout() - { - X = Application.GetRealWidth(2), - Y = fanView.Bottom, - Width = Application.GetRealWidth(144), - Height = Application.GetRealHeight(44), - }; - dialogContentView.AddChidren(heatHumiView); - heatHumiView.AddChidren(new Button - { - Gravity = Gravity.CenterHorizontal, - Width = Application.GetRealWidth(112), - Height = 1, - BackgroundColor = CSS.CSS_Color.DividingLineColor, - }); - IconButton heatHumiIconButton = new IconButton("FunctionIcon/Acst/grey/ModeHeatHumiIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeHeatHumiIcon.png", - Language.StringByID(StringId.HeatingAndDehumidification), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.heat_humidity.ToString()); - heatHumiIconButton.Click(() => { - btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeHeatHumiIcon2.png"; - dialog.Close(); - new System.Threading.Thread(() => { - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add("mode", AcstParent_Attr_ModeValueEnum.heat_humidity.ToString()); - Control.Ins.SendWriteCommand(function, d); - }) - { IsBackground = true }.Start(); - }); - heatHumiView.AddChidren(heatHumiIconButton); - #endregion + #region 鍒剁儹闄ゆ箍 + var heatHumiView = new FrameLayout() + { + X = Application.GetRealWidth(2), + Width = Application.GetRealWidth(144), + Height = Application.GetRealHeight(44), + }; + dialogContentView.AddChidren(heatHumiView); + heatHumiView.AddChidren(new Button + { + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(112), + Height = 1, + BackgroundColor = CSS.CSS_Color.DividingLineColor, + }); + IconButton heatHumiIconButton = new IconButton("FunctionIcon/Acst/grey/ModeHeatHumiIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeHeatHumiIcon.png", + Language.StringByID(StringId.HeatingAndDehumidification), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.heat_humidity.ToString()); + heatHumiIconButton.Click(() => + { + btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeHeatHumiIcon2.png"; + dialog.Close(); + new System.Threading.Thread(() => + { + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add("mode", AcstParent_Attr_ModeValueEnum.heat_humidity.ToString()); + Control.Ins.SendWriteCommand(function, d); + }) + { IsBackground = true }.Start(); + }); + heatHumiView.AddChidren(heatHumiIconButton); + #endregion + } - #region 鍔犳箍 - var humiView = new FrameLayout() + if (function.GetAttribute(AcstParent_AttrEnum.mode.ToString()).value.Contains(AcstParent_Attr_ModeValueEnum.humidity.ToString())) { - X = Application.GetRealWidth(2), - Y = heatHumiView.Bottom, - Width = Application.GetRealWidth(144), - Height = Application.GetRealHeight(44), - }; - dialogContentView.AddChidren(humiView); - humiView.AddChidren(new Button - { - Width = Application.GetRealWidth(112), - Gravity = Gravity.CenterHorizontal, - Height = 1, - BackgroundColor = CSS.CSS_Color.DividingLineColor, - }); - IconButton humiIconButton = new IconButton("FunctionIcon/Acst/grey/ModeHumiIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeHumiIcon.png", - Language.StringByID(StringId.Humidification), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.humidity.ToString()); - humiIconButton.Click(() => { - btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeHumiIcon2.png"; - dialog.Close(); - new System.Threading.Thread(() => { - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add("mode", AcstParent_Attr_ModeValueEnum.humidity.ToString()); - Control.Ins.SendWriteCommand(function, d); - }) - { IsBackground = true }.Start(); - }); - humiView.AddChidren(humiIconButton); - #endregion + + #region 鍔犳箍 + var humiView = new FrameLayout() + { + X = Application.GetRealWidth(2), + Width = Application.GetRealWidth(144), + Height = Application.GetRealHeight(44), + }; + dialogContentView.AddChidren(humiView); + humiView.AddChidren(new Button + { + Width = Application.GetRealWidth(112), + Gravity = Gravity.CenterHorizontal, + Height = 1, + BackgroundColor = CSS.CSS_Color.DividingLineColor, + }); + IconButton humiIconButton = new IconButton("FunctionIcon/Acst/grey/ModeHumiIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeHumiIcon.png", + Language.StringByID(StringId.Humidification), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.humidity.ToString()); + humiIconButton.Click(() => + { + btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeHumiIcon2.png"; + dialog.Close(); + new System.Threading.Thread(() => + { + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add("mode", AcstParent_Attr_ModeValueEnum.humidity.ToString()); + Control.Ins.SendWriteCommand(function, d); + }) + { IsBackground = true }.Start(); + }); + humiView.AddChidren(humiIconButton); + #endregion + } dialog.Show(); }; @@ -918,10 +955,11 @@ dialog.Close(); }; - var dialogContentView = new FrameLayout() + var dialogContentView = new VerticalScrolViewLayout() { X = Application.GetRealWidth(194), Y = Application.GetRealHeight(419), + ScrollEnabled = false, Width = Application.GetRealWidth(148), Height = Application.GetRealHeight(191), BackgroundImagePath = "FunctionIcon/Acst/BgChooseScene.png", @@ -948,98 +986,116 @@ }; titleView.AddChidren(btnTitleText); - #region 鍦ㄥ - var atHomeView = new FrameLayout() + if (function.GetAttribute(AcstParent_AttrEnum.scene.ToString()).value.Contains(AcstParent_Attr_SceneValueEnum.at_home.ToString())) { - X = Application.GetRealWidth(2), - Y = titleView.Bottom, - Width = Application.GetRealWidth(144), - Height = Application.GetRealHeight(44), - }; - dialogContentView.AddChidren(atHomeView); - atHomeView.AddChidren(new Button - { - Width = Application.GetRealWidth(112), - Gravity = Gravity.CenterHorizontal, - Height = 1, - BackgroundColor = CSS.CSS_Color.DividingLineColor, - }); - IconButton atHomeIconButton = new IconButton("FunctionIcon/Acst/grey/SceneAtHome.png", $"FunctionIcon/Acst/{imageFolder}/SceneAtHome.png", + #region 鍦ㄥ + var atHomeView = new VerticalScrolViewLayout() + { + X = Application.GetRealWidth(2), + //Y = titleView.Bottom, + Width = Application.GetRealWidth(144), + Height = Application.GetRealHeight(44), + }; + dialogContentView.AddChidren(atHomeView); + atHomeView.AddChidren(new Button + { + Width = Application.GetRealWidth(112), + Gravity = Gravity.CenterHorizontal, + Height = 1, + BackgroundColor = CSS.CSS_Color.DividingLineColor, + }); + + IconButton atHomeIconButton = new IconButton("FunctionIcon/Acst/grey/SceneAtHome.png", $"FunctionIcon/Acst/{imageFolder}/SceneAtHome.png", Language.StringByID(StringId.AtHome), curColor, function.GetAttrState(AcstParent_AttrEnum.scene.ToString()) == AcstParent_Attr_SceneValueEnum.at_home.ToString()); - atHomeIconButton.Click(() => { - btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/SceneAtHome2.png"; - dialog.Close(); - new System.Threading.Thread(() => { - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add(AcstParent_AttrEnum.scene.ToString(), AcstParent_Attr_SceneValueEnum.at_home.ToString()); - Control.Ins.SendWriteCommand(function, d); - }) - { IsBackground = true }.Start(); - }); - atHomeView.AddChidren(atHomeIconButton); - #endregion + atHomeIconButton.Click(() => + { + btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/SceneAtHome2.png"; + dialog.Close(); + new System.Threading.Thread(() => + { + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add(AcstParent_AttrEnum.scene.ToString(), AcstParent_Attr_SceneValueEnum.at_home.ToString()); + Control.Ins.SendWriteCommand(function, d); + }) + { IsBackground = true }.Start(); + }); + atHomeView.AddChidren(atHomeIconButton); + #endregion + } - #region 绂诲 - var awayHomeView = new FrameLayout() + if (function.GetAttribute(AcstParent_AttrEnum.scene.ToString()).value.Contains(AcstParent_Attr_SceneValueEnum.leave_home.ToString())) { - X = Application.GetRealWidth(2), - Y = atHomeView.Bottom, - Width = Application.GetRealWidth(144), - Height = Application.GetRealHeight(44), - }; - dialogContentView.AddChidren(awayHomeView); - awayHomeView.AddChidren(new Button - { - Width = Application.GetRealWidth(112), - Gravity = Gravity.CenterHorizontal, - Height = 1, - BackgroundColor = CSS.CSS_Color.DividingLineColor, - }); - IconButton awayHomeIconButton = new IconButton("FunctionIcon/Acst/grey/SceneAwayHomeIcon.png", $"FunctionIcon/Acst/{imageFolder}/SceneAwayHomeIcon.png", - Language.StringByID(StringId.AwayHome), curColor, function.GetAttrState(AcstParent_AttrEnum.scene.ToString()) == AcstParent_Attr_SceneValueEnum.leave_home.ToString()); - awayHomeIconButton.Click(() => { - btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/SceneAwayHomeIcon2.png"; - dialog.Close(); - new System.Threading.Thread(() => { - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add("scene", "leave_home"); - Control.Ins.SendWriteCommand(function, d); - }) - { IsBackground = true }.Start(); - }); - awayHomeView.AddChidren(awayHomeIconButton); - #endregion + #region 绂诲 + var awayHomeView = new FrameLayout() + { + X = Application.GetRealWidth(2), + //Y = atHomeView.Bottom, + Width = Application.GetRealWidth(144), + Height = Application.GetRealHeight(44), + }; + dialogContentView.AddChidren(awayHomeView); + awayHomeView.AddChidren(new Button + { + Width = Application.GetRealWidth(112), + Gravity = Gravity.CenterHorizontal, + Height = 1, + BackgroundColor = CSS.CSS_Color.DividingLineColor, + }); + IconButton awayHomeIconButton = new IconButton("FunctionIcon/Acst/grey/SceneAwayHomeIcon.png", $"FunctionIcon/Acst/{imageFolder}/SceneAwayHomeIcon.png", + Language.StringByID(StringId.AwayHome), curColor, function.GetAttrState(AcstParent_AttrEnum.scene.ToString()) == AcstParent_Attr_SceneValueEnum.leave_home.ToString()); + awayHomeIconButton.Click(() => + { + btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/SceneAwayHomeIcon2.png"; + dialog.Close(); + new System.Threading.Thread(() => + { + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add("scene", "leave_home"); + Control.Ins.SendWriteCommand(function, d); + }) + { IsBackground = true }.Start(); + }); + awayHomeView.AddChidren(awayHomeIconButton); + #endregion + } - #region 鐫$湢 - var sleepView = new FrameLayout() + + if (function.GetAttribute(AcstParent_AttrEnum.scene.ToString()).value.Contains(AcstParent_Attr_SceneValueEnum.sleep.ToString())) { - X = Application.GetRealWidth(2), - Y = awayHomeView.Bottom, - Width = Application.GetRealWidth(144), - Height = Application.GetRealHeight(44), - }; - dialogContentView.AddChidren(sleepView); - sleepView.AddChidren(new Button - { - Height = 1, - Gravity = Gravity.CenterHorizontal, - Width = Application.GetRealWidth(112), - BackgroundColor = CSS.CSS_Color.DividingLineColor, - }); - IconButton sleepIconButton = new IconButton("FunctionIcon/Acst/grey/SceneSleepIcon.png", $"FunctionIcon/Acst/{imageFolder}/SceneSleepIcon.png", - Language.StringByID(StringId.Sleep), curColor, function.GetAttrState(AcstParent_AttrEnum.scene.ToString()) == AcstParent_Attr_SceneValueEnum.sleep.ToString()); - sleepIconButton.Click(() => { - btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/SceneSleepIcon2.png"; - dialog.Close(); - new System.Threading.Thread(() => { - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add("scene", "sleep"); - Control.Ins.SendWriteCommand(function, d); - }) - { IsBackground = true }.Start(); - }); - sleepView.AddChidren(sleepIconButton); + + #region 鐫$湢 + var sleepView = new FrameLayout() + { + X = Application.GetRealWidth(2), + //Y = awayHomeView.Bottom, + Width = Application.GetRealWidth(144), + Height = Application.GetRealHeight(44), + }; + dialogContentView.AddChidren(sleepView); + sleepView.AddChidren(new Button + { + Height = 1, + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(112), + BackgroundColor = CSS.CSS_Color.DividingLineColor, + }); + IconButton sleepIconButton = new IconButton("FunctionIcon/Acst/grey/SceneSleepIcon.png", $"FunctionIcon/Acst/{imageFolder}/SceneSleepIcon.png", + Language.StringByID(StringId.Sleep), curColor, function.GetAttrState(AcstParent_AttrEnum.scene.ToString()) == AcstParent_Attr_SceneValueEnum.sleep.ToString()); + sleepIconButton.Click(() => + { + btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/SceneSleepIcon2.png"; + dialog.Close(); + new System.Threading.Thread(() => + { + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add("scene", "sleep"); + Control.Ins.SendWriteCommand(function, d); + }) + { IsBackground = true }.Start(); + }); + sleepView.AddChidren(sleepIconButton); + } #endregion dialog.Show(); }; diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs index 56a78a0..f61de04 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