| | |
| | | //deviceListScrolView.SetCornerWithSameRadius(Application.GetRealHeight(50), HDLUtils.RectCornerTopLeft); |
| | | |
| | | tempFunctionTypeBtn = new FunctionButton(); |
| | | tempFunctionTypeBtn.Init("",""); |
| | | |
| | | EventHandler<MouseEventArgs> ShowSameTypeFunction = (object typeSender, MouseEventArgs mouseEventArgs) => |
| | | { |
| | |
| | | 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) |
| | | { |
| | |
| | | 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) |
| | | { |
| | |
| | | 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) |
| | | { |
| | |
| | | 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) => |
| | | { |
| | |
| | | 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) => |
| | | { |
| | |
| | | { |
| | | 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 |
| | | { |
| | |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | }; |