From b9cb076fe6127160c96c35bf9c8cebcffe1d5ccd Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 10 一月 2020 17:35:23 +0800
Subject: [PATCH] 2020.1.10
---
ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs | 76 ++++++++++++++++++++++++--------------
1 files changed, 48 insertions(+), 28 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs
index 16caf21..8a99190 100644
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs
@@ -76,7 +76,7 @@
AddTop();
- AddBodyView(device);
+ AddBodyView(device,room);
}
@@ -102,7 +102,7 @@
/// <summary>
/// AddBodyView
/// </summary>
- public void AddBodyView(DeviceUI device)
+ public void AddBodyView(DeviceUI device, Common.Room room)
{
bodyFrameLayout = new FrameLayout()
{
@@ -144,7 +144,7 @@
};
bodyFrameLayout.AddChidren(deviceIMG);
- var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device.CommonDevice });
+ var info = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device.CommonDevice);
var deviceTypeName = new Button()
{
@@ -182,32 +182,65 @@
};
infoFL.AddChidren(tipBtn);
- var nameRow = new DeviceInfoEditRow(170);
+ var infoScrolView = new VerticalScrolViewLayout
+ {
+ Y = Application.GetRealHeight(170-12),
+ Height = Application.GetRealHeight(600),
+ ScrollEnabled = false,
+ VerticalScrollBarEnabled = false
+ };
+ infoFL.AddChidren(infoScrolView);
+
+ var nameFL = new FrameLayout
+ {
+ Height = Application.GetRealHeight(127 + 12)
+ };
+ infoScrolView.AddChidren(nameFL);
+ var nameRow = new DeviceInfoEditRow(12);
nameRow.Init();
nameRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.FunctionName)} : ");
nameRow.SetTitle(string.IsNullOrEmpty(device.CommonDevice.DeviceEpointName) ? Language.StringByID(R.MyInternationalizationString.UNKnown) : device.CommonDevice.DeviceEpointName);
- infoFL.AddChidren(nameRow);
+ nameFL.AddChidren(nameRow);
- var zoneRow = new DeviceInfoRow(308);
+
+ var zoneFL = new FrameLayout
+ {
+ Height = Application.GetRealHeight(127 + 12)
+ };
+ if (room != null && room.IsLove == false)
+ {
+ infoScrolView.AddChidren(zoneFL);
+ }
+ var zoneRow = new DeviceInfoRow(12);
zoneRow.Init();
zoneRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.BelongZone)} : ");
zoneRow.SetTitle(roomName);
- infoFL.AddChidren(zoneRow);
+ zoneFL.AddChidren(zoneRow);
- var modelRow = new DeviceInfoRow(446);
+ var modelFL = new FrameLayout
+ {
+ Height = Application.GetRealHeight(127 + 12)
+ };
+ infoScrolView.AddChidren(modelFL);
+ var modelRow = new DeviceInfoRow(12);
modelRow.Init();
modelRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.BelongModel)} : ");
modelRow.SetTitle(string.IsNullOrEmpty(device.CommonDevice.DeviceName) ? Language.StringByID(R.MyInternationalizationString.UNKnown) : device.CommonDevice.DeviceName);
modelRow.HideNext(true);
- infoFL.AddChidren(modelRow);
+ modelFL.AddChidren(modelRow);
- if (device.CommonDevice.Type==ZigBee.Device.DeviceType.OnOffOutput)
+ if (device.CommonDevice.Type==DeviceType.OnOffOutput || device.CommonDevice.Type==DeviceType.AirSwitch)
{
- functionTypeRow = new DeviceInfoRow(585);
+ var typeFL = new FrameLayout
+ {
+ Height = Application.GetRealHeight(127 + 12)
+ };
+ infoScrolView.AddChidren(typeFL);
+ functionTypeRow = new DeviceInfoRow(12);
functionTypeRow.Init();
functionTypeRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.FunctionType)} : ");
//functionTypeRow.SetTitle(device.CommonDevice.DfunctionType);
- infoFL.AddChidren(functionTypeRow);
+ typeFL.AddChidren(functionTypeRow);
var dfunctionType = device.CommonDevice.DfunctionType;
//鍔熻兘绫诲瀷鐨勭炕璇戝悕瀛�
@@ -277,21 +310,8 @@
}
};
};
+ }
- //sharedRow = new DeviceInfoRow(723);
- //sharedRow.Init();
- //sharedRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.Share)} : ");
- //sharedRow.SetTitle("2浜�");
- //infoFL.AddChidren(sharedRow);
- }
- else
- {
- //sharedRow = new DeviceInfoRow(585);
- //sharedRow.Init();
- //sharedRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.Share)} : ");
- //sharedRow.SetTitle("2浜�");
- //infoFL.AddChidren(sharedRow);
- }
var confirmBtn = new CommonForm.CompleteButton(962, 900, 127);
confirmBtn.SetTitle(R.MyInternationalizationString.Save);
@@ -332,10 +352,10 @@
CommonPage.Loading.Start();
if (device.CommonDevice == null)
{
- CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain);
+ CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.FailedPleaseTryAgain));
return;
}
- if (device.CommonDevice.Type == ZigBee.Device.DeviceType.OnOffOutput)
+ if (device.CommonDevice.Type == DeviceType.OnOffOutput || device.CommonDevice.Type == DeviceType.AirSwitch)
{
if (device.IsCustomizeImage == false)
{
--
Gitblit v1.8.0