From 699a687e7bbf3f041320280a80d6359ee374cc30 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 27 一月 2021 17:15:38 +0800
Subject: [PATCH] 第三方添加设备界面
---
HDL-ON_iOS/Resources/Language.ini | 6 +
HDL_ON/DAL/Server/NewAPI.cs | 10 +++
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/ThirdPartyBrandListPage.cs | 55 +++++++++++++++++
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs | 2
HDL_ON/UI/UI0-Public/Widget/EmptyTipView.cs | 8 ++
HDL_ON/Common/R.cs | 3 +
.vs/HDL_APP_Project/xs/UserPrefs.xml | 39 ++++++++----
7 files changed, 104 insertions(+), 19 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 5a6af2d..bbb3581 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,15 +1,19 @@
锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
<MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" />
- <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/Server/HttpServerRequest.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs">
<Files>
- <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs" Line="313" Column="13" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" Line="264" Column="48" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs" Line="16" Column="16" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/ThirdPartyBrandListPage.cs" Line="21" Column="1" />
- <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" Line="1" Column="1" />
- <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="394" Column="50" />
- <File FileName="HDL_ON/Entity/Function/Function.cs" Line="24" Column="1" />
- <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="1794" Column="25" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/ThirdPartyBrandListPage.cs" Line="38" Column="61" />
+ <File FileName="HDL-ON_iOS/Resources/Language.ini" Line="1052" Column="7" />
+ <File FileName="HDL_ON/Common/R.cs" Line="8" Column="51" />
+ <File FileName="HDL_ON/UI/UI0-Public/Widget/EmptyTipView.cs" Line="26" Column="28" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/FunctionIntroductionPage.cs" Line="70" Column="45" />
+ <File FileName="HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs" Line="271" Column="31" />
+ <File FileName="HDL_ON/UI/MainPage.cs" Line="89" Column="47" />
+ <File FileName="HDL_ON/DAL/Server/NewAPI.cs" Line="465" Column="23" />
+ <File FileName="HDL_ON/DAL/Server/NewApiRes.cs" Line="1" Column="1" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" Line="1" Column="1" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" Line="1" Column="1" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" Line="264" Column="55" />
</Files>
<Pads>
<Pad Id="ProjectPad">
@@ -18,21 +22,30 @@
<Node name="HDL_ON" expanded="True">
<Node name="Common" expanded="True" />
<Node name="DAL" expanded="True">
- <Node name="Server" expanded="True">
- <Node name="HttpServerRequest.cs" selected="True" />
- </Node>
+ <Node name="Server" expanded="True" />
</Node>
<Node name="UI" expanded="True">
<Node name="CSS" expanded="True" />
+ <Node name="UI0-Public" expanded="True">
+ <Node name="Widget" expanded="True" />
+ </Node>
<Node name="UI1-Login" expanded="True" />
<Node name="UI2" expanded="True">
+ <Node name="1-HomePage" expanded="True" />
<Node name="2-Classification" expanded="True" />
<Node name="3-Intelligence" expanded="True">
<Node name="Automation" expanded="True">
<Node name="LogicView" expanded="True" />
</Node>
</Node>
- <Node name="4-PersonalCenter" expanded="True" />
+ <Node name="4-PersonalCenter" expanded="True">
+ <Node name="AboutOn" expanded="True" />
+ <Node name="AddFunction" expanded="True" />
+ <Node name="PersonalCenterPageBLL.cs" selected="True" />
+ </Node>
+ <Node name="FuntionControlView" expanded="True">
+ <Node name="AC" expanded="True" />
+ </Node>
</Node>
</Node>
</Node>
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index ee66e21..9d4699e 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -392,6 +392,7 @@
407=Reading
408=Comfirm
409=Function brand
+410=You haven't added any platform devices yet
5000=Music
5001=Group
@@ -604,7 +605,7 @@
9049=Incorrect password for many times, the account number is locked!
9050=Verify the face ID
9051=Fail to save the user's face ID
-'
+
9052=The push notification of registration is available.
9053=The push notification of registration is abnormal.
9054=Numeric password verification
@@ -1046,6 +1047,9 @@
407=闃呰
408=纭娣诲姞
409=鍔熻兘鍝佺墝
+410=浣犲綋鍓嶈繕鏈坊鍔犱换浣曞钩鍙拌澶�
+411=鍏朵粬骞冲彴璁惧鍧囩敱绗笁鏂规湇鍔″晢鎻愪緵鏀寔
+412=娣诲姞
5000=闊充箰
5001=缁勫悎
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index afb06d7..c63bf59 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -4,6 +4,9 @@
{
public static class StringId
{
+ public const int Add = 412;
+ public const int TipAddThirdPartyDeviceMsg = 411;
+ public const int TipNotThirdPartyDevice = 410;
public const int FunctionBrand = 409;
public const int ConfirmAdd = 408;
public const int Reading = 407;
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index 8e13686..58ab186 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -459,7 +459,17 @@
public const string API_POST_Logic_Enable = "/home-wisdom/app/logic/enable";
#endregion
+ #region -- 绗笁鏂硅澶囩浉鍏虫帴鍙__________________________
+ /// <summary>
+ /// 鑾峰彇娣诲姞杩囩殑鍝佺墝鍒楄〃
+ /// </summary>
+ public const string Api_Post_GetBindBrandList = "/home-wisdom/app/product/brand/bindList";
+ /// <summary>
+ /// 鑾峰彇鍝佺墝鍒楄〃
+ /// </summary>
+ public const string Api_Post_GetBrandList = "/home-wisdom/app/product/brand/list";
+ #endregion
#endregion
}
diff --git a/HDL_ON/UI/UI0-Public/Widget/EmptyTipView.cs b/HDL_ON/UI/UI0-Public/Widget/EmptyTipView.cs
old mode 100755
new mode 100644
index 877297c..c0ac00b
--- a/HDL_ON/UI/UI0-Public/Widget/EmptyTipView.cs
+++ b/HDL_ON/UI/UI0-Public/Widget/EmptyTipView.cs
@@ -23,8 +23,12 @@
/// <summary>
///
/// </summary>
- public EmptyTipView()
+ public EmptyTipView(string tipMsg ="")
{
+ if(tipMsg == "")
+ {
+ tipMsg = Language.StringByID(StringId.ContentIsEmpty);
+ }
int tipHeight = Application.GetRealWidth(180);
this.Height = tipHeight + Application.GetRealHeight(17);
@@ -43,7 +47,7 @@
{
Y = tipHeight,
Height = Application.GetRealHeight(17),
- TextID = StringId.ContentIsEmpty,
+ Text = tipMsg,
TextAlignment = TextAlignment.Center,
TextColor = CSS_Color.TextualColor,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/ThirdPartyBrandListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/ThirdPartyBrandListPage.cs
index f15a581..30cb186 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/ThirdPartyBrandListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/ThirdPartyBrandListPage.cs
@@ -1,13 +1,13 @@
锘縰sing System;
+using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
{
public class ThirdPartyBrandListPage : FrameLayout
{
- bool already = false;
-
FrameLayout bodyView;
+ FrameLayout contentView;
public ThirdPartyBrandListPage()
{
@@ -18,8 +18,59 @@
{
new TopViewDiv(bodyView, Language.StringByID(StringId.FunctionBrand)).LoadTopView();
+ contentView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(64),
+ Height = Application.GetRealHeight(667-64),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ bodyView.AddChidren(contentView);
+ AddEmptyTipView();
+ Button btnTipMsg = new Button()
+ {
+ Height = Application.GetRealHeight(17 + 24),
+ Y = Application.GetRealHeight(535 - 12),
+ TextColor = CSS_Color.TextualColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextAlignment = TextAlignment.Center,
+ TextID = StringId.TipAddThirdPartyDeviceMsg,
+ };
+ bodyView.AddChidren(btnTipMsg);
+
+ Button btnAdd = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(564),
+ Width = Application.GetRealWidth(220),
+ Height = Application.GetRealWidth(44),
+ Radius = (uint)Application.GetRealWidth(22),
+ BackgroundColor = CSS_Color.MainColor,
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextID = StringId.Add,
+ };
+ bodyView.AddChidren(btnAdd);
+ }
+
+ /// <summary>
+ /// 娣诲姞鍐呭涓虹┖鎻愮ず椤甸潰
+ /// </summary>
+ void AddEmptyTipView()
+ {
+ var emptyTipView = new FrameLayout()
+ {
+ Height =Application.GetRealWidth(470),
+ Width = contentView.Width,
+ };
+ contentView.AddChidren(emptyTipView);
+
+ var tipView = new EmptyTipView(Language.StringByID(StringId.TipNotThirdPartyDevice))
+ {
+ Gravity = Gravity.Center
+ };
+ emptyTipView.AddChidren(tipView);
}
}
}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
index 3ee42a6..f331743 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -261,7 +261,7 @@
{
EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
{
- var page = new SearchDevicePage();
+ var page = new ThirdPartyBrandListPage();
MainPage.BasePageView.AddChidren(page);
page.LoadPage();
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
--
Gitblit v1.8.0