From d41f1d4a478c1afcc43f3a5abb0ba76e376bc7c1 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 09 三月 2021 15:23:25 +0800
Subject: [PATCH] 2
---
HDL-ON_Android/Properties/AndroidManifest.xml | 2
HDL-ON_Android/Assets/Language.ini | 11 ++
HDL_ON/UI/UI2/UserPage.cs | 38 +++-----
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs | 1
HDL_ON/DAL/DriverLayer/Control_Udp.cs | 2
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 2
HDL-ON_iOS/Info.plist | 4
HDL_ON/Entity/Function/Function.cs | 18 ++++
HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs | 12 ++
HDL_ON/Common/Utlis.cs | 2
.vs/HDL_APP_Project/xs/UserPrefs.xml | 65 +++++----------
HDL_ON/DAL/DriverLayer/Control.cs | 23 +++--
HDL_ON/UI/MainPage.cs | 10 ++
13 files changed, 101 insertions(+), 89 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index cfc82dd..7b5a245 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,43 +1,33 @@
锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
<MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
- <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/Common/R.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/DriverLayer/Control.cs">
<Files>
- <File FileName="HDL-ON_iOS/BlueWifi.cs" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs" Line="60" Column="54" />
- <File FileName="HDL_ON/Common/R.cs" Line="7" Column="20" />
- <File FileName="HDL_ON/UI/UI0-Public/Widget/EmptyTipView.cs" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs" Line="123" Column="77" />
+ <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" />
+ <File FileName="HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs" />
+ <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" />
+ <File FileName="HDL-ON_iOS/Info.plist" />
<File FileName="HDL_ON/UI/MainPage.cs" />
- <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="180" Column="51" />
- <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="214" Column="62" />
- <File FileName="HDL_ON/Entity/FunctionList.cs" Line="42" Column="40" />
- <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs" Line="245" Column="35" />
- <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs" Line="328" Column="86" />
- <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="138" Column="55" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/AC/AcControlPage.cs" Line="487" Column="1" />
- <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="464" Column="1" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs" Line="45" Column="59" />
- <File FileName="HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs" Line="72" Column="96" />
+ <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs" Line="186" Column="40" />
+ <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="468" Column="87" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="HDL_APP_Project" expanded="True">
<Node name="HDL_ON" expanded="True">
- <Node name="Common" expanded="True">
- <Node name="R.cs" selected="True" />
- </Node>
+ <Node name="Common" expanded="True" />
<Node name="DAL" expanded="True">
- <Node name="DriverLayer" expanded="True" />
+ <Node name="DriverLayer" expanded="True">
+ <Node name="Control.cs" selected="True" />
+ </Node>
+ <Node name="Mqtt" expanded="True" />
+ </Node>
+ <Node name="Entity" expanded="True">
+ <Node name="Function" expanded="True" />
</Node>
<Node name="UI" expanded="True">
<Node name="UI0-Stan" expanded="True">
- <Node name="Controls" expanded="True">
- <Node name="BottomControls" expanded="True" />
- </Node>
+ <Node name="Logic" expanded="True" />
</Node>
<Node name="UI2" expanded="True">
<Node name="FuntionControlView" expanded="True">
@@ -47,24 +37,10 @@
</Node>
</Node>
<Node name="HDL-ON_Android" expanded="True">
- <Node name="Assets" expanded="True">
- <Node name="Phone" expanded="True">
- <Node name="FunctionIcon" expanded="True">
- <Node name="AC" expanded="True" />
- </Node>
- </Node>
- </Node>
- <Node name="Properties" expanded="True" />
- <Node name="Resources" expanded="True" />
+ <Node name="Assets" expanded="True" />
</Node>
<Node name="HDL-ON_iOS" expanded="True">
- <Node name="Resources" expanded="True">
- <Node name="Phone" expanded="True">
- <Node name="FunctionIcon" expanded="True">
- <Node name="AC" expanded="True" />
- </Node>
- </Node>
- </Node>
+ <Node name="Resources" expanded="True" />
</Node>
</Node>
</State>
@@ -80,7 +56,10 @@
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
<MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
- <BreakpointStore />
+ <BreakpointStore>
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs" line="186" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/DriverLayer/Control.cs" relfile="HDL_ON/DAL/DriverLayer/Control.cs" line="469" column="1" />
+ </BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
</Properties>
\ No newline at end of file
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index ec7ad2d..e960c83 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -411,7 +411,11 @@
426=Air dry time
427=Disinfect time
428=Anion Time
-
+429=H
+430=Min
+431=You are currently adding any platform devices to
+432=Other platform equipment is supported by third party service provider
+433=Water valve
1002=Anion
@@ -1089,6 +1093,11 @@
426=椋庡共鏃堕棿
427=娑堟瘨鏃堕棿
428=璐熺瀛愭椂闂�
+429=灏忔椂
+430=鍒嗛挓
+431=浣犲綋鍓嶈繕涓烘坊鍔犱换浣曞钩鍙拌澶�
+432=鍏朵粬骞冲彴璁惧鍧囩敱绗笁鏂规湇鍔″晢鎻愪緵鏀寔
+433=姘撮榾
1000=瀹ゅ唴婀垮害
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 8ed53ae..9400e20 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:versionCode="202103081" android:versionName="1.1.202103081" package="com.hdl.onpro">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103091" android:versionName="1.1.202103091" package="com.hdl.onpro">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" />
<!-- 瀹氫綅鏉冮檺-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index ab1c23f..b7585b2 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -102,9 +102,9 @@
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>CFBundleShortVersionString</key>
- <string>1.1.202103081</string>
+ <string>1.1.202103092</string>
<key>CFBundleVersion</key>
- <string>202103081</string>
+ <string>202103092</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Use geographic location to provide services such as weather</string>
<key>NSAppleMusicUsageDescription</key>
diff --git a/HDL_ON/Common/Utlis.cs b/HDL_ON/Common/Utlis.cs
index e2c5604..7dfc9fe 100644
--- a/HDL_ON/Common/Utlis.cs
+++ b/HDL_ON/Common/Utlis.cs
@@ -273,7 +273,7 @@
}
/// <summary>
- ///
+ /// 鏃堕棿鎴宠浆鏃堕棿瀛楃涓�
/// </summary>
/// <param name="unixTimeStamp"></param>
/// <param name="format"></param>
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 7982419..335e8db 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -50,15 +50,15 @@
return _msg_id++;
}
}
- /// <summary>
- /// 鑾峰彇13浣嶆椂闂存埑
- /// </summary>
- /// <returns></returns>
- public string Get_TimeStamp()
- {
- long t = DateTime.Now.Ticks / 10000;
- return t.ToString();
- }
+ ///// <summary>
+ ///// 鑾峰彇13浣嶆椂闂存埑
+ ///// </summary>
+ ///// <returns></returns>
+ //public string Get_TimeStamp()
+ //{
+ // long t = DateTime.Now.Ticks / 10000;
+ // return t.ToString();
+ //}
/// <summary>
/// 鏄惁鎼滅储鏈湴缃戝叧鎴愬姛
@@ -602,7 +602,7 @@
}
}
- MainPage.Log($"灞�鍩熺綉淇℃伅: {receiveObj.Topic}");
+ //MainPage.Log($"灞�鍩熺綉淇℃伅: {receiveObj.Topic}");
//楠岃瘉鏈夋晥鏁版嵁闀垮害
@@ -623,7 +623,7 @@
var device = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceModule>(bodyJObj.objects.ToString());
if (device.device_mac == DB_ResidenceData.Instance.residenceGatewayMAC)
{
- MainPage.Log("鏈湴鎼滅储缃戝叧鎴愬姛");
+ //MainPage.Log("鏈湴鎼滅储缃戝叧鎴愬姛");
Ins.IsSearchLocalGatewaySuccessful = true;
Ins.GatewayOnline_Local = true;
if (!string.IsNullOrEmpty(device.gatewayId))
@@ -689,6 +689,7 @@
MainPage.Log($"A鍗忚鏇存柊鐘舵��:{revString}");
foreach (var attr in updateTemp.status)
{
+ localFunction.time_stamp = temp.time_stamp;
localFunction.SetAttrState(attr.key, attr.value);
}
diff --git a/HDL_ON/DAL/DriverLayer/Control_Udp.cs b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
index d4762a2..35e8539 100644
--- a/HDL_ON/DAL/DriverLayer/Control_Udp.cs
+++ b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -957,7 +957,7 @@
{
try
{
- var sendJob = new JObject { { "id", Control.Ins.msg_id.ToString() }, { "time_stamp", (DateTime.Now.Ticks / 100000).ToString() } };
+ var sendJob = new JObject { { "id", Control.Ins.msg_id.ToString() }, { "time_stamp", Utlis.GetTimestamp ()} };
var bodyString = JsonConvert.SerializeObject(sendJob);
var sendBytes = Control.Ins.ConvertSendBodyData(CommunicationTopic.SearchLoaclGateway, bodyString);
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 1b663ae..6bf5e6d 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -65,6 +65,22 @@
#region 浼樺寲鍖哄煙 2021-02-25
/// <summary>
+ /// 鏇存柊鐨勬渶鍚庢椂闂�
+ /// </summary>
+ public string time_stamp = "1615261019796";
+
+ public string GeteTime()
+ {
+ try
+ {
+ DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // 褰撳湴鏃跺尯
+ return startTime.AddMilliseconds(Convert.ToDouble(time_stamp)).ToString("s");
+ }
+ catch {
+ return DateTime.MinValue.ToString("s");
+ }
+ }
+ /// <summary>
/// 鑾峰彇灞炴�у垪琛�
/// </summary>
/// <returns></returns>
@@ -512,7 +528,7 @@
{
var sendDataObj = new AlinkFunctionStatusObj();
sendDataObj.id = Control.Ins.msg_id.ToString();
- sendDataObj.time_stamp = Control.Ins.Get_TimeStamp();
+ sendDataObj.time_stamp = Utlis.GetTimestamp();
var acd = new AlinkStatusData();
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 4e348c3..b365695 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string VersionString = "1.1.0308";
+ public static string VersionString = "1.1.0309";
///// <summary>
///// 瀹㈡埛绔被鍨�
///// </summary>
@@ -53,6 +53,14 @@
/// 鏄惁杩涘叆鍚庡彴
/// </summary>
public static bool IsEnterBackground = false;
+ /// <summary>
+ /// 褰撳墠鍒嗛〉绱㈠紩
+ /// 0:鏀惰棌
+ /// 1:鍒嗙被
+ /// 2:鏅鸿兘
+ /// 3:涓汉
+ /// </summary>
+ public static int CurPageIndex = 9999;
///// <summary>
///// 鍏徃浠g爜
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index f2c7f27..f18f109 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -26,7 +26,7 @@
/// </summary>
public static void RefreshFunctionView()
{
- if (bodyView != null)
+ if (bodyView != null && MainPage.CurPageIndex==0)
{
bodyView.LoadDeviceFunctionControlZone();
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
index ccd8737..aa73f74 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
@@ -405,6 +405,7 @@
{
lightingView.SetViewStatus(lightTemp.state == "on");
}
+ Console.WriteLine($"鏃堕棿鎴筹細{device.time_stamp} 鏃堕棿锛歿device.GeteTime()} 鐑樺共:{hotDryTemp.state} 椋庡共:{windDryTemp.state} 娑堟瘨:{disinfectTemp.state} 鐏厜鐘舵�侊細{lightTemp.state}");
#endregion
#region 淇敼鏃堕棿
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs
index 33c247f..b652cf6 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs
@@ -48,6 +48,12 @@
this.InitFrameWhiteContent1();
//鍒锋柊鐣岄潰鐘舵��
this.RefreshFormStatu();
+ //璇诲彇鐘舵��
+ new System.Threading.Thread(() =>
+ {
+ Control.Ins.ReadFunctionsInfo(new List<string>() { device.deviceId});
+ })
+ { IsBackground = true }.Start();
}
/// <summary>
@@ -187,7 +193,7 @@
{
btnControlTip.TextID = StringId.ControllerNotOn;
}
- this.btnSwitch.IsSelected = this.btnPictrue.IsSelected = onoffStatu.value.ToString() == "on";
+ this.btnSwitch.IsSelected = this.btnPictrue.IsSelected = onoffStatu.state.ToString() == "on";
}
if (timeStatu != null)
{
@@ -252,8 +258,8 @@
private void SetControlTime()
{
var timeControl = new BottomTimeSelectControl();
- timeControl.RowCount = 3;
- timeControl.InitControl(0,0,162);
+ timeControl.RowCount = 5;
+ timeControl.InitControl(0,0);
timeControl.FinishEvent = (type,hours,min) => {
if (type == 1)//0:鍙栨秷锛�1:纭畾
{
diff --git a/HDL_ON/UI/UI2/UserPage.cs b/HDL_ON/UI/UI2/UserPage.cs
index 51a7e42..4397173 100644
--- a/HDL_ON/UI/UI2/UserPage.cs
+++ b/HDL_ON/UI/UI2/UserPage.cs
@@ -86,14 +86,6 @@
#endregion
#endregion
- /// <summary>
- /// 褰撳墠鍔ㄧ敾鏁堟灉
- /// 0:鏀惰棌
- /// 1:鍒嗙被
- /// 2:鏅鸿兘
- /// 3:涓汉
- /// </summary>
- int CurAnimationEffect = 0;
public void LoadPage()
{
@@ -307,9 +299,9 @@
/// <summary>
/// 鍒囨崲鍒版敹钘忕晫闈�
/// </summary>
- void ChooseCollection(bool qiangzhishuaxin = false)
+ void ChooseCollection()
{
- if (CurAnimationEffect == 0 || qiangzhishuaxin)
+ if (MainPage.CurPageIndex == 0)
{
return;
}
@@ -337,10 +329,10 @@
distance /= total;
new System.Threading.Thread(() => {
int index = 0;
- CurAnimationEffect = 0;
+ MainPage.CurPageIndex = 0;
while (index < total+1)
{
- if (CurAnimationEffect != 0)
+ if (MainPage.CurPageIndex != 0)
{
break;
}
@@ -391,7 +383,7 @@
/// </summary>
void ChooseClassification()
{
- if (CurAnimationEffect == 1)
+ if (MainPage.CurPageIndex == 1)
{
return;
}
@@ -413,15 +405,15 @@
distance /= total;
new System.Threading.Thread(() =>
{
- if (CurAnimationEffect == 1)
+ if (MainPage.CurPageIndex == 1)
{
return;
}
- CurAnimationEffect = 1;
+ MainPage.CurPageIndex = 1;
int index = 0;
while (index < total+1)
{
- if (CurAnimationEffect != 1)
+ if (MainPage.CurPageIndex != 1)
{
break;
}
@@ -482,7 +474,7 @@
/// </summary>
void ChooseIntellectualization()
{
- if (CurAnimationEffect == 2)
+ if (MainPage.CurPageIndex == 2)
{
return;
}
@@ -503,15 +495,15 @@
}
distance /= total;
new System.Threading.Thread(() => {
- if (CurAnimationEffect == 2)
+ if (MainPage.CurPageIndex == 2)
{
return;
}
- CurAnimationEffect = 2;
+ MainPage.CurPageIndex = 2;
int index = 0;
while (index < total+1)
{
- if(CurAnimationEffect!=2)
+ if(MainPage.CurPageIndex!=2)
{
break;
}
@@ -579,7 +571,7 @@
return;
}
#endif
- if (CurAnimationEffect == 3)
+ if (MainPage.CurPageIndex == 3)
{
return;
}
@@ -605,11 +597,11 @@
}
distance /= total;
new System.Threading.Thread(() => {
- CurAnimationEffect = 3;
+ MainPage.CurPageIndex = 3;
int index = 0;
while (index < total+1)
{
- if (CurAnimationEffect != 3)
+ if (MainPage.CurPageIndex != 3)
{
break;
}
--
Gitblit v1.8.0