From 2ebaff33420cabdf1c9c2937343185ae4b5ff985 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 08 五月 2020 17:37:27 +0800
Subject: [PATCH] 2020-05-08-1
---
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs | 79 ++++++++++-----------------------------
1 files changed, 20 insertions(+), 59 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
old mode 100644
new mode 100755
index 0cd43ec..97b170b
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -43,7 +43,7 @@
var middle = new VerticalScrolViewLayout
{
Y = view.topRowLayout.Bottom,
- Height = Application.GetRealHeight(1920 - 184-180),
+ Height = Application.GetRealHeight(Method.H - 184-180),
BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
};
this.AddChidren(middle);
@@ -280,7 +280,7 @@
case 1:
{
var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]);
- name = deviceinof.DeviceEpointName;
+ name = LocalDevice.Current.GetDeviceEpointName(deviceinof);
selecteddevice.regionNameBtn.Visible = true;
Method.RoomNmae(selecteddevice.regionNameBtn, deviceinof);
@@ -450,7 +450,7 @@
{
if (Common.Logic.CurrentLogic.Accounts[a]["UserId"] == conditions["AttriButeData2"])
{
- state = Common.Logic.CurrentLogic.Accounts[a]["Account"];
+ state = Common.Logic.CurrentLogic.Accounts[a]["AccountName"];
break;
}
@@ -499,16 +499,18 @@
s = "鈮�";
}
break;
- }
+ }
+ ///杞崲娓╁害鍊�/100
+ string srtValue = (int.Parse(conditions["AttriButeData1"]) / 100).ToString();
if (conditions["Cluster_ID"] == "1026")
{
icon = "ZigeeLogic/temperature.png";
- state = s + conditions["AttriButeData1"] + "鈩�";
+ state = s + srtValue + "鈩�";
}
else
{
icon = "ZigeeLogic/humidity.png";
- state = s + conditions["AttriButeData1"] + "%";
+ state = s + srtValue + "%";
}
break;
@@ -660,10 +662,11 @@
alert.ConfirmClickEvent += () =>
{
Common.Logic.CurrentLogic.Conditions.Remove(conditions);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
+ selecteddevice.selecetdFrameLayout.RemoveFromParent();
+ //var logicCommunalPage = new LogicCommunalPage();
+ //UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ //UserView.HomePage.Instance.PageIndex += 1;
+ //logicCommunalPage.Show(() => { });
};
};
@@ -724,7 +727,7 @@
{
var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
- name = deviceinof.DeviceEpointName;
+ name = LocalDevice.Current.GetDeviceEpointName(deviceinof);
actiondevice.regionNameBtn.Visible = true;
Method.RoomNmae(actiondevice.regionNameBtn, deviceinof);
switch (deviceinof.Type)
@@ -1151,11 +1154,12 @@
alert.ConfirmClickEvent += () =>
{
Common.Logic.CurrentLogic.Actions.Remove(actions);
+ actiondevice.selecetdFrameLayout.RemoveFromParent();
// devicesFrameLayout.RemoveFromParent();
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
+ //var logicCommunalPage = new LogicCommunalPage();
+ //UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ //UserView.HomePage.Instance.PageIndex += 1;
+ //logicCommunalPage.Show(() => { });
};
};
@@ -1324,50 +1328,7 @@
};
}
- /// <summary>
- /// 闂幇寮忔彁绀烘鐨勬柟娉�
- /// </summary>
- /// <param name="tipText">鎻愮ず鍐呭</param>
- /// <param name="second">鍋滅暀鏃堕棿鍗曚綅涓簊</param>
- public void TipView(string tipText, int second = 1)
- {
-
- var frameLayout = new FrameLayout { BackgroundColor = 0x50000000 };
- this.AddChidren(frameLayout);
-
- var btn = new Button
- {
- Gravity = Gravity.Center,
- Text = tipText,
- BackgroundColor = 0xff1f1f1f,
- Width = Application.GetRealWidth(500),
- Height = Application.GetRealHeight(100),
- Radius = (uint)Application.GetRealHeight(50),
- };
- frameLayout.AddChidren(btn);
-
- var dateTime1 = DateTime.Now;
- new System.Threading.Thread(() =>
- {
- Application.RunOnMainThread(() =>
- {
- while (true)
- {
- if ((DateTime.Now - dateTime1).TotalMilliseconds > second * 1000)
- {
- //榛樿涓�绉掑叧闂�
- frameLayout.RemoveFromParent();
- break;
- }
- }
- });
- })
- { IsBackground = true }.Start();
-
- }
-
-
-
+
}
}
--
Gitblit v1.8.0