From ee31aee3192d1235a87898708962e1f1f1c1650b Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 25 十月 2022 14:54:21 +0800 Subject: [PATCH] 智慧人居备份 --- ThirdPartyIntegration/OnproUmengSdk/.idea/vcs.xml | 6 +++ ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/gradle.xml | 2 HDL_ON/DAL/Server/HttpUtil.cs | 4 +- ThirdPartyIntegration/OnproUmengSdk/.idea/OnproUmengSdk.iml | 9 ++++ ThirdPartyIntegration/OnproUmengSdk/.idea/modules.xml | 8 ++++ HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs | 29 +++++++++----- HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs | 47 ++++++++++++----------- HDL_ON/UI/UI1-Login/LoginPage.cs | 6 +- SiriIntents/Server/HttpUtil.cs | 4 +- 9 files changed, 73 insertions(+), 42 deletions(-) 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/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index eb5ba3e..47320de 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 = "18316672920"; + etAccount.Text = "13535293836"; } else { @@ -252,9 +252,9 @@ } b = !b; etPassword.Text = "123456"; - if(etAccount.Text == "13288623489") + if(etAccount.Text == "13535293836") { - etPassword.Text = "luoxiaodong"; + etPassword.Text = "shan1987"; } //etPassword.Text = "Hdl85521566"; btnLogin.IsSelected = true; diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs index 2178573..167d25e 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs @@ -33,7 +33,7 @@ SensorDiyView sensorDiyView_Tvoc; SensorDiyView sensorDiyView_EleDay; SensorDiyView sensorDiyView_EleMonth; - SensorDiyView sensorDiyView_EleTotal; + SensorDiyView sensorDiyView_EleActivePower; #endregion /// <summary> /// 瀛愭帶鍖哄煙鍒楄〃 @@ -113,8 +113,8 @@ basePage.sensorDiyView_EleDay.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.day_electricity.ToString()).state); if (basePage.sensorDiyView_EleMonth != null) basePage.sensorDiyView_EleMonth.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.month_electricity.ToString()).state); - if (basePage.sensorDiyView_EleTotal != null) - basePage.sensorDiyView_EleTotal.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.total_electricity.ToString()).state); + if (basePage.sensorDiyView_EleActivePower != null) + basePage.sensorDiyView_EleActivePower.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.active_power.ToString()).state); @@ -397,28 +397,33 @@ if (tempObj != null) { - sensorDiyView_Temp = new SensorDiyView(sensorListView, curColor, tempObj.state == "" ? "--" : tempObj.state + "掳", "娓╁害"); + sensorDiyView_Temp = new SensorDiyView(sensorListView, curColor, tempObj.state == "" ? "--" : tempObj.state, "掳", "娓╁害"); } if (humiObj != null) { - sensorDiyView_Humi = new SensorDiyView(sensorListView, curColor, humiObj.state == "" ? "--" : humiObj.state + "%", "婀垮害"); + sensorDiyView_Humi = new SensorDiyView(sensorListView, curColor, humiObj.state == "" ? "--" : humiObj.state, "%", "婀垮害"); } if (pm25Obj != null) { - sensorDiyView_Pm25 = new SensorDiyView(sensorListView, curColor, pm25Obj.state == "" ? "--" : pm25Obj.state, "PM2.5"); + 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"); + 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"); + sensorDiyView_Tvoc = new SensorDiyView(sensorListView, curColor, tvocObj.state == "" ? "--" : tvocObj.state, "", "TVOC"); } #endregion #region 鑳借�楁暟鎹� int energyCount = 0; + var totalObj = function.GetAttribute(AcstParent_AttrEnum.active_power.ToString()); + if (totalObj != null) + { + energyCount++; + } var dayObj = function.GetAttribute(AcstParent_AttrEnum.day_electricity.ToString()); if (dayObj != null) { @@ -426,11 +431,6 @@ } var monthObj = function.GetAttribute(AcstParent_AttrEnum.month_electricity.ToString()); if (monthObj != null) - { - energyCount++; - } - var totalObj = function.GetAttribute(AcstParent_AttrEnum.total_electricity.ToString()); - if (totalObj != null) { energyCount++; } @@ -442,17 +442,17 @@ Visible = false, }; infoContentView.AddChidren(energyListView); + if (totalObj != null) + { + sensorDiyView_EleActivePower = new SensorDiyView(energyListView, curColor, totalObj.state == "" ? "--" : totalObj.state , "KW", "鐢ㄧ數鍔熺巼", 100); + } if (dayObj != null) { - sensorDiyView_EleDay = new SensorDiyView(energyListView, curColor, dayObj.state == "" ? "--" : dayObj.state + "KW", "浠婃棩鑰楃數",100); + sensorDiyView_EleDay = new SensorDiyView(energyListView, curColor, dayObj.state == "" ? "--" : dayObj.state , "KW", "浠婃棩鑰楃數",100); } if (monthObj != null) { - sensorDiyView_EleMonth = new SensorDiyView(energyListView, curColor, monthObj.state == "" ? "--" : monthObj.state + "KWh", "鏈湀鑰楃數", 100); - } - if (totalObj != null) - { - sensorDiyView_EleTotal = new SensorDiyView(energyListView, curColor, totalObj.state == "" ? "--" : totalObj.state + "KWh", "鎬昏�楃數閲�", 100); + sensorDiyView_EleMonth = new SensorDiyView(energyListView, curColor, monthObj.state == "" ? "--" : monthObj.state , "KWh", "鏈湀鑰楃數", 100); } var btnChangeClick = new Button(); @@ -1019,9 +1019,11 @@ private Button btnValue; private Button btnText; public string Tag; + public string unitString; - public SensorDiyView(HorizontalScrolViewLayout view,uint color,string value,string text,int setWidth = 60) + public SensorDiyView(HorizontalScrolViewLayout view,uint color,string value,string unitStr,string text,int setWidth = 60) { + unitString = unitStr; if (string.IsNullOrEmpty(value)) { value = "--"; @@ -1044,7 +1046,7 @@ TextAlignment = TextAlignment.Center, TextColor = color, TextSize = 20, - Text = value, + Text = value + unitString, }; contentView.AddChidren(btnValue); @@ -1062,7 +1064,7 @@ public void UpdateValue(string value) { - btnText.Text = value; + btnValue.Text = value + unitString; } } @@ -1175,7 +1177,6 @@ btnRoomInfo.MouseUpEventHandler = eventHandler; btnSubHumidityIcon.MouseUpEventHandler = eventHandler; btnSubHumidityValues.MouseUpEventHandler = eventHandler; - btnSubPower.MouseUpEventHandler = eventHandler; btnSubTempIcon.MouseUpEventHandler = eventHandler; btnSubTempValues.MouseUpEventHandler = eventHandler; subFunctionView.MouseUpEventHandler = eventHandler; diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs index 90f1464..f6a5fbd 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs @@ -36,24 +36,29 @@ int setTempValue = 0; - int.TryParse(temp.GetAttrState(AcstSub_AttrEnum.set_temp.ToString(), "--"), out setTempValue); + double dd = 0; + double.TryParse(temp.GetAttrState(AcstSub_AttrEnum.set_temp.ToString(), "--"), out dd); + setTempValue = Convert.ToInt32(dd); if (setTempValue != 0) bodyView.btnSetTempValues.Text = setTempValue.ToString(); bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10); - int progress = 0; - int.TryParse(temp.GetAttrState(FunctionAttributeKey.SetTemp), out progress); - bodyView.tempBar.Progress = progress + 16; + //int progress = 0; + //int.TryParse(temp.GetAttrState(AcstSub_AttrEnum.set_temp.ToString()), out progress); + bodyView.tempBar.Progress = setTempValue - 16; if(temp.trait_on_off.curValue.ToString() == "on") { bodyView.btnPowerControl.IsSelected = true; - bodyView.tempBar.Enable = false; + bodyView.tempBar.ProgressBarColor = bodyView.curColor; + bodyView.tempBar.IsOffline = false; + } else { bodyView.btnPowerControl.IsSelected = false; - bodyView.tempBar.Enable = true; + bodyView.tempBar.ProgressBarColor = CSS_Color.DividingLineColor; + bodyView.tempBar.IsOffline = true; } }); @@ -195,7 +200,7 @@ { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(260), - Width = Application.GetRealWidth(71), + Width = Application.GetRealWidth(77), Height = Application.GetRealHeight(90), TextAlignment = TextAlignment.TopRight, TextColor = CSS.CSS_Color.FirstLevelTitleColor, @@ -205,10 +210,12 @@ }; contentView.AddChidren(btnSetTempValues); int setTempValue = 0; - int.TryParse(function.GetAttrState(AcstSub_AttrEnum.set_temp.ToString(), "--"), out setTempValue); + double dd = 0; + double.TryParse(function.GetAttrState(AcstSub_AttrEnum.set_temp.ToString(), "--"), out dd); + setTempValue = Convert.ToInt32(dd); if (setTempValue != 0) btnSetTempValues.Text = setTempValue.ToString(); - bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10); + //bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10); @@ -259,7 +266,7 @@ SeekBarPadding = Application.GetRealWidth(20), IsProgressTextShow = false, ProgressChangeDelayTime = 0, - Enable = function.trait_on_off.curValue.ToString() == "off", + //Enable = function.trait_on_off.curValue.ToString() == "off", //IsOffline = function.trait_on_off.curValue.ToString() == "off", }; contentView.AddChidren(tempBar); @@ -269,7 +276,7 @@ tempBar.OnStopTrackingTouchEvent = (sender, e) => { new System.Threading.Thread(() => { var d = new Dictionary<string, string>(); - d.Add(FunctionAttributeKey.SetTemp, e.ToString()); + d.Add(FunctionAttributeKey.SetTemp, (e+16).ToString()); Control.Ins.SendWriteCommand(function, d); }) { IsBackground = true }.Start(); 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> diff --git a/ThirdPartyIntegration/OnproUmengSdk/.idea/OnproUmengSdk.iml b/ThirdPartyIntegration/OnproUmengSdk/.idea/OnproUmengSdk.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/ThirdPartyIntegration/OnproUmengSdk/.idea/OnproUmengSdk.iml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$" /> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file diff --git a/ThirdPartyIntegration/OnproUmengSdk/.idea/modules.xml b/ThirdPartyIntegration/OnproUmengSdk/.idea/modules.xml new file mode 100644 index 0000000..5ddb7b6 --- /dev/null +++ b/ThirdPartyIntegration/OnproUmengSdk/.idea/modules.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/.idea/OnproUmengSdk.iml" filepath="$PROJECT_DIR$/.idea/OnproUmengSdk.iml" /> + </modules> + </component> +</project> \ No newline at end of file diff --git a/ThirdPartyIntegration/OnproUmengSdk/.idea/vcs.xml b/ThirdPartyIntegration/OnproUmengSdk/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/ThirdPartyIntegration/OnproUmengSdk/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="$PROJECT_DIR$/../.." vcs="Git" /> + </component> +</project> \ No newline at end of file diff --git a/ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/gradle.xml b/ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/gradle.xml index 01dc696..d50bec8 100644 --- a/ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/gradle.xml +++ b/ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/gradle.xml @@ -7,7 +7,7 @@ <option name="testRunner" value="GRADLE" /> <option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="externalProjectPath" value="$PROJECT_DIR$" /> - <option name="gradleJvm" value="#JAVA_HOME" /> + <option name="gradleJvm" value="1.8" /> <option name="modules"> <set> <option value="$PROJECT_DIR$" /> -- Gitblit v1.8.0