| | |
| | | /// </summary> |
| | | private Button floorBtn; |
| | | /// <summary> |
| | | /// 当前楼层id |
| | | /// </summary> |
| | | private string curFloorId; |
| | | /// <summary> |
| | | /// 选择楼层 |
| | | /// </summary> |
| | | private Button selectFloorBtn; |
| | |
| | | typeIdDic.Clear(); |
| | | foreach (var device in devList) |
| | | { |
| | | var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device.CommonDevice }); |
| | | var info = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device.CommonDevice); |
| | | if (info.BeloneType == DeviceBeloneType.A开关 || info.BeloneType == DeviceBeloneType.A彩灯 |
| | | || info.BeloneType == DeviceBeloneType.A插座 || info.BeloneType == DeviceBeloneType.A智能空开 |
| | | || info.BeloneType == DeviceBeloneType.A灯光 || info.BeloneType == DeviceBeloneType.A空调 |
| | | || info.BeloneType == DeviceBeloneType.A窗帘 || info.BeloneType == DeviceBeloneType.A继电器 |
| | | || info.BeloneType == DeviceBeloneType.A调光器 |
| | | || info.BeloneType == DeviceBeloneType.A调光器 |
| | | ) |
| | | { |
| | | if (typeDeviceDic.ContainsKey(info.BeloneTextId) == false) |
| | |
| | | { |
| | | var floors = new SelectFloor(); |
| | | AddChidren(floors); |
| | | floors.changeFloor = false; |
| | | floors.CurFloorId = curFloorId; |
| | | floors.Init(580, 184, Direction.Right); |
| | | floors.FloorAction += (floorId) => |
| | | { |
| | | curFloorId = floorId; |
| | | floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId); |
| | | RefreshBodyView(floorId); |
| | | }; |
| | |
| | | }; |
| | | string imgPath = string.Empty; |
| | | string imgSeletedPath = string.Empty; |
| | | Common.LocalDevice.Current.GetDeviceBeloneIcon(deviceType.Value, ref imgPath, ref imgSeletedPath); |
| | | Common.LocalDevice.Current.GetDeviceObjectIcon(deviceType.Value, ref imgPath, ref imgSeletedPath); |
| | | functionTypeIMG.Init(imgPath, imgSeletedPath); |
| | | functionTypeIMG.SetTitle(deviceType.Key); |
| | | typeRowLayout.AddChidren(functionTypeIMG); |
| | |
| | | |
| | | var sameTypeList = new List<DeviceUI> { }; |
| | | sameTypeList = typeDeviceDic[int.Parse((typeSender as Button).Tag.ToString())]; |
| | | |
| | | |
| | | foreach (var device in sameTypeList) |
| | | { |
| | | if (beforeSceneTargetDeviceUIs.Find((obj) => obj.DeviceUI.DeviceEpoint == device.DeviceEpoint && obj.DeviceUI.DeviceAddr == device.DeviceAddr) != null) |
| | |
| | | deviceListScrolView.AddChidren(deviceTypeRowLayout); |
| | | |
| | | var deviceRow = new FunctionRow(0, 35); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | | deviceRow.Init(device.IconPath, device.OnlineIconPath, true); |
| | | deviceRow.SetTitle(device.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | deviceRow.IsSelected = true; |
| | | deviceRow.HideSwitchBtn(false); |
| | | deviceRow.NameBtn.BackgroundColor = ZigbeeColor.Current.GXCRedColor; |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | | |
| | | |
| | | deviceRow.ClickBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | Height = Application.GetRealHeight(200), |
| | | Width = Application.GetRealWidth(700), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = Language.StringByID(R.MyInternationalizationString.NoFunction_Tip).Replace("{\\r\\n}", "\r\n"), |
| | | Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}", "\r\n"), |
| | | TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | IsMoreLines = true |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | dialog.RemoveFromParent(); |
| | | }; |
| | | |
| | | open.SeekBar.ProgressChanged += (sender, e) => |
| | | open.SeekBar.OnProgressChangedEvent += (sender, e) => |
| | | { |
| | | open.IsSelected = true; |
| | | shut.IsSelected = false; |
| | |
| | | { |
| | | open.IsSelected = true; |
| | | shut.IsSelected = false; |
| | | open.SetProgress(sceneTarget.TaskList[0].Data2); |
| | | open.SetSeekBarProgress(sceneTarget.TaskList[0].Data2); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | dialog.RemoveFromParent(); |
| | | }; |
| | | |
| | | open.SeekBar.ProgressChanged += (sender, e) => |
| | | open.SeekBar.OnProgressChangedEvent += (sender, e) => |
| | | { |
| | | open.IsSelected = true; |
| | | shut.IsSelected = false; |
| | |
| | | { |
| | | open.IsSelected = true; |
| | | shut.IsSelected = false; |
| | | open.SetProgress(sceneTarget.TaskList[0].Data1); |
| | | open.SetSeekBarProgress(sceneTarget.TaskList[0].Data1); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | var deviceName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | Width = Application.GetRealWidth(600), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |