From c26d742cef5ac268ca902b6605512b6476a26bc2 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期四, 05 十二月 2019 15:22:27 +0800 Subject: [PATCH] 2019.12.5 --- ZigbeeApp/Shared/Phone/Device/Category/Category.cs | 87 +++++++++++++++++++++++++------------------ 1 files changed, 51 insertions(+), 36 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs index 90f0282..9bda29b 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs @@ -843,6 +843,7 @@ //deviceListScrolView.SetCornerWithSameRadius(Application.GetRealHeight(50), HDLUtils.RectCornerTopLeft); tempFunctionTypeBtn = new FunctionButton(); + tempFunctionTypeBtn.Init("",""); EventHandler<MouseEventArgs> ShowSameTypeFunction = (object typeSender, MouseEventArgs mouseEventArgs) => { @@ -1004,16 +1005,18 @@ Tag = deviceUI, Radius = 0 }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() { Tag = deviceUI, Radius = 0 }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; + if (room.IsSharedRoom == false) + { + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + } } else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.AirSwitch) { @@ -1102,16 +1105,19 @@ Tag = deviceUI, Radius = 0 }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() { Tag = deviceUI, Radius = 0 }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; + if (room.IsSharedRoom == false) + { + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + } + } else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.DimmableLight) { @@ -1200,17 +1206,18 @@ Tag = deviceUI, Radius = 0 }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() { Tag = deviceUI, Radius = 0 }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; - + if (room.IsSharedRoom == false) + { + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + } } else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.Thermostat) { @@ -1291,16 +1298,18 @@ Tag = deviceUI, Radius = 0 }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() { Tag = deviceUI, Radius = 0 }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; + if (room.IsSharedRoom == false) + { + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + } deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => { @@ -1376,16 +1385,18 @@ Tag = deviceUI, Radius = 0 }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() { Tag = deviceUI, Radius = 0 }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; + if (room.IsSharedRoom == false) + { + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + } deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => { @@ -1428,15 +1439,17 @@ { Tag = deviceUI }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() { Tag = deviceUI }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; + if (room.IsSharedRoom == false) + { + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + } } else { @@ -1460,15 +1473,17 @@ { Tag = deviceUI }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() { Tag = deviceUI }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; + if (room.IsSharedRoom == false) + { + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + } } } }; -- Gitblit v1.8.0