From c47c3ec2488961b3a006aaebcb03dba582f8b19b Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期四, 12 三月 2020 17:08:42 +0800 Subject: [PATCH] 2020-03-12-1 --- ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs | 371 ++++++++++++++++++++++++++++++++-------------------- 1 files changed, 225 insertions(+), 146 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs index 9b92c37..485d479 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs @@ -3,6 +3,7 @@ using Shared.Common; using Shared.Phone.Device.CommonForm; using Shared.Phone.UserView; +using ZigBee.Device; namespace Shared.Phone.Device.Category { @@ -30,6 +31,10 @@ /// </summary> private Button floorBtn; /// <summary> + /// 褰撳墠妤煎眰id + /// </summary> + private string curFloorId; + /// <summary> /// 閫夋嫨妤煎眰 /// </summary> private Button selectFloorBtn; @@ -40,7 +45,7 @@ /// <summary> /// deviceUI /// </summary> - public DeviceUI deviceUI; + public CommonDevice deviceUI; /// <summary> /// 鍔熻兘绫诲瀷 /// </summary> @@ -56,11 +61,11 @@ /// <summary> /// 璁惧绫诲瀷RowLayout /// </summary> - private FrameLayout typeRowLayout; + //private FrameLayout typeRowLayout; /// <summary> /// 鍔熻兘绫诲瀷鎸夐挳 /// </summary> - private FunctionButton functionTypeIMG; + //private FunctionButton functionTypeIMG; /// <summary> /// 娓╁害 /// </summary> @@ -74,9 +79,28 @@ /// </summary> private int fanid; + /// <summary> + /// dList + /// </summary> + private List<CommonDevice> devList; + /// <summary> + /// 鐩稿悓绫诲瀷鐨勮澶囧垪琛� + /// </summary> + private Dictionary<int, List<CommonDevice>> typeDeviceDic; + /// <summary> + /// 璁惧绫诲瀷鐨勫浘id + /// </summary> + private Dictionary<int, DeviceConcreteType> typeIdDic; + /// <summary> + /// 褰撳墠閫変腑鎴块棿 + /// </summary> + private Common.Room curRoom; #endregion + /// <summary> + /// RemoveFromParent + /// </summary> public override void RemoveFromParent() { HomePage.Instance.ScrollEnabled = true; @@ -96,6 +120,8 @@ /// </summary> public void Show() { + InitData(); + if (sceneTargetDevice == null) { sceneTargetDevice = new SceneTargetDeviceUI { Type = 0 }; @@ -107,6 +133,47 @@ RefreshBodyView(Config.Instance.Home.CurrentFloorId); } + /// <summary> + /// InitData + /// </summary> + private void InitData() + { + typeDeviceDic = new Dictionary<int, List<CommonDevice>> { }; + typeIdDic = new Dictionary<int, DeviceConcreteType> { }; + } + + /// <summary> + /// RefreshData + /// </summary> + private void RefreshData(Common.Room room) + { + devList = UserCenter.HdlRoomLogic.Current.GetRoomListDevice(room); + typeDeviceDic.Clear(); + typeIdDic.Clear(); + foreach (var device in devList) + { + var info = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device); + 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璋冨厜鍣� + ) + { + if (typeDeviceDic.ContainsKey(info.BeloneTextId) == false) + { + var sameDevList = new List<CommonDevice> { }; + sameDevList.Add(device); + typeDeviceDic[info.BeloneTextId] = sameDevList; + } + else + { + typeDeviceDic[info.BeloneTextId].Add(device); + } + typeIdDic[info.BeloneTextId] = info.ConcreteType; + } + } + } #region Add____________________________________ /// <summary> @@ -117,7 +184,7 @@ var top = new TopFrameLayout(); AddChidren(top); top.InitTopview(); - top.SetTopTitle(R.MyInternationalizationString.AddScence); + top.SetTopTitle(R.MyInternationalizationString.AddFunction); top.backButton.MouseUpEventHandler += (sender, e) => { RemoveFromParent(); @@ -131,6 +198,8 @@ Gravity = Gravity.CenterVertical, TextAlignment = TextAlignment.CenterRight, TextColor = ZigbeeColor.Current.GXCTextBlackColor, + TextSize=14, + IsBold=true }; selectFloorBtn = new Button() @@ -161,9 +230,12 @@ { 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); }; @@ -210,54 +282,45 @@ functionSceneBodyView = new FrameLayout() { Y = roomFL.Bottom, - Height = Application.GetRealHeight(910 + 622), + Height = Application.GetRealHeight(279+35+1218), BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor }; bodyFrameLayout.AddChidren(functionSceneBodyView); - Button curBtn = new Button(); - foreach (var room in Common.Room.CurrentRoom.GetRoomsByFloorIdAppendLoveRoom(floorId)) + RoomButton curBtn = new RoomButton(0, 0); + var lisrRoom = UserCenter.HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(floorId); + foreach (var room in lisrRoom) { var row = new FrameLayout() { - Width = Application.GetRealWidth(187 + 50), - Height = Application.GetRealHeight(204), + Width = Application.GetRealWidth(255), + Height = Application.GetRealHeight(167) }; roomFL.AddChidren(row); - var roomBtn = new Button() - { - Width = Application.GetRealWidth(187), - Height = Application.GetRealHeight(78), - Radius = (uint)Application.GetRealHeight(78 / 2), - Gravity = Gravity.Center, - Text = room.Name, - TextColor = ZigbeeColor.Current.GXCTextGrayColor, - SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor, - BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor3, - SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor, - BorderColor = ZigbeeColor.Current.GXCBorderUnSelectedColor, - BorderWidth = 1 - }; + RoomButton roomBtn = new RoomButton(0, 0); + roomBtn.Gravity = Gravity.Center; + roomBtn.Init(); + roomBtn.SetTitle(room.Name); row.AddChidren(roomBtn); if (room.IsLove) { roomBtn.IsSelected = true; curBtn = roomBtn; - + this.curRoom = room; RefreshFunction(room); } - roomBtn.MouseUpEventHandler += (sender, e) => + roomBtn.ButtonClickEvent += (sender, e) => { - if ((sender as Button) == curBtn) + if (sender == curBtn) { return; } - (sender as Button).IsSelected = true; + sender.IsSelected = true; curBtn.IsSelected = false; - curBtn = sender as Button; - + curBtn = sender; + this.curRoom = room; RefreshFunction(room); }; } @@ -275,111 +338,132 @@ /// <param name="room"></param> private void RefreshFunction(Common.Room room) { + RefreshData(room); functionSceneBodyView.RemoveAll(); - if (room.DeviceUIList.Count == 0) + if (typeDeviceDic.Count == 0) { ShowNoFunctionTip(); } else { + var functionTypeView1 = new FrameLayout + { + X = Application.GetRealWidth(CommonFormResouce.X_Left), + Height = Application.GetRealHeight(160), + Width = Application.GetRealWidth(1028), + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + }; + functionSceneBodyView.AddChidren(functionTypeView1); + functionTypeView1.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft); + + var functionTypeView2 = new FrameLayout + { + X = Application.GetRealWidth(CommonFormResouce.X_Left), + Y = Application.GetRealHeight(150), + Height = Application.GetRealHeight(279 - 150), + Width = Application.GetRealWidth(1028), + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + }; + functionSceneBodyView.AddChidren(functionTypeView2); + functionTypeView2.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerBottomLeft); + functionTypeScrowView = new HorizontalScrolViewLayout { X = Application.GetRealWidth(CommonFormResouce.X_Left), Height = Application.GetRealHeight(279), - Width = Application.GetRealWidth(1028), - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + Width = Application.GetRealWidth(1028) }; functionSceneBodyView.AddChidren(functionTypeScrowView); deviceListScrolView = new VerticalScrolViewLayout { X = Application.GetRealWidth(CommonFormResouce.X_Left), - Y = functionTypeScrowView.Bottom + Application.GetRealHeight(50), + Y = Application.GetRealHeight(35 + 275), Width = Application.GetRealWidth(1028), - Height = functionSceneBodyView.Height - Application.GetRealHeight(279 + 50) - 1, + Height = Application.GetRealHeight(1218), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; functionSceneBodyView.AddChidren(deviceListScrolView); + deviceListScrolView.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft); + tempFunctionTypeBtn = new FunctionButton(); + tempFunctionTypeBtn.Init("",""); - EventHandler<MouseEventArgs> ShowSameTypeFunction = (object typeSender, MouseEventArgs mouseEventArgs) => + foreach (var deviceType in typeIdDic) { - tempFunctionTypeBtn.IsSelected = false; - tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton; - ((typeSender as Button).Parent as FunctionButton).IsSelected = true; - - deviceListScrolView.RemoveAll(); - - var sameTypeList = new List<DeviceUI> { }; - foreach (var devieceUI in room.DeviceUIList) + var typeRowLayout = new FrameLayout() { - if (devieceUI == null || devieceUI.CommonDevice == null) - { - continue; - } - if (devieceUI.CommonDevice.Type.ToString() == (typeSender as Button).Tag.ToString()) - { - if (!sameTypeList.Contains(devieceUI)) - { - sameTypeList.Add(devieceUI); - } - } - } - foreach (var device in sameTypeList) - { - if (beforeSceneTargetDeviceUIs.Find((obj) => obj.DeviceUI.DeviceEpoint == device.DeviceEpoint && obj.DeviceUI.DeviceAddr == device.DeviceAddr) != null) - { - continue; - } - var deviceTypeRowLayout = new FrameLayout() - { - Height = Application.GetRealHeight(127 + 35), - Tag = device - }; - 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.SetStatu(device.CommonDevice.IsOnline == 1); - deviceRow.HideSwitchBtn(false); - - deviceRow.ClickBtn.MouseUpEventHandler += (sender, e) => - { - ShowSelectAction(device, sceneTargetDevice); - }; - } - }; - - foreach (var deviceType in Common.Room.GetdeviceTypes(room)) - { - typeRowLayout = new FrameLayout() - { - Width = Application.GetRealWidth(CommonPage.AppRealWidth / 5), - Tag = deviceType + Width = Application.GetRealWidth(220), }; functionTypeScrowView.AddChidren(typeRowLayout); - functionTypeIMG = new FunctionButton() + var functionTypeIMG = new FunctionButton() { - Tag = deviceType + Tag = deviceType.Key }; - functionTypeIMG.Init(DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType), DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType)); - functionTypeIMG.SetTitle(DeviceUI.GetDeviceTypeName(deviceType)); + string imgPath = string.Empty; + string imgSeletedPath = string.Empty; + Common.LocalDevice.Current.GetDeviceObjectIcon(deviceType.Value, ref imgPath, ref imgSeletedPath); + functionTypeIMG.Init(imgPath, imgSeletedPath); + functionTypeIMG.SetTitle(deviceType.Key); typeRowLayout.AddChidren(functionTypeIMG); functionTypeIMG.ClickBtn.MouseUpEventHandler += ShowSameTypeFunction; - - if (deviceType == room.DeviceUIList[0].CommonDevice.Type) + if (functionTypeScrowView.ChildrenCount == 1) { - ShowSameTypeFunction(functionTypeIMG.ClickBtn, null); + ShowSameTypeFunction(functionTypeIMG.ImageBtn, null); } } } } + + /// <summary> + /// 鏄剧ず鐩稿悓绫诲瀷鐨勫姛鑳� + /// </summary> + /// <param name="typeSender">typeSender.</param> + /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param> + private void ShowSameTypeFunction(object typeSender, MouseEventArgs mouseEventArgs) + { + tempFunctionTypeBtn.IsSelected = false; + tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton; + ((typeSender as Button).Parent as FunctionButton).IsSelected = true; + + deviceListScrolView.RemoveAll(); + + var sameTypeList = new List<CommonDevice> { }; + 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) + { + continue; + } + var deviceTypeRowLayout = new FrameLayout() + { + Height = Application.GetRealHeight(127 + 35), + Tag = device + }; + deviceListScrolView.AddChidren(deviceTypeRowLayout); + + var deviceRow = new FunctionRow(0, 35); + deviceRow.Init(device.IconPath, device.OnlineIconPath, true); + deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(device)); + deviceRow.IsSelected = true; + deviceRow.HideSwitchBtn(false); + deviceRow.NameBtn.BackgroundColor = ZigbeeColor.Current.GXCRedColor; + deviceTypeRowLayout.AddChidren(deviceRow); + + + deviceRow.ClickBtn.MouseUpEventHandler += (sender, e) => + { + ShowSelectAction(device, sceneTargetDevice); + }; + } + } + /// <summary> /// 鎻愮ず娌℃湁鍔熻兘 @@ -414,7 +498,7 @@ /// ShowSelectAction /// </summary> /// <param name="device"></param> - private void ShowSelectAction(DeviceUI device, SceneTargetDeviceUI sceneTarget) + private void ShowSelectAction(CommonDevice device, SceneTargetDeviceUI sceneTarget) { var dialog = new FrameLayout() { @@ -427,23 +511,23 @@ dialog.RemoveFromParent(); }; - if (device.CommonDevice.Type == ZigBee.Device.DeviceType.OnOffOutput) + if (device.Type == ZigBee.Device.DeviceType.OnOffOutput) { SelectOnoffOutput(dialog, device, sceneTarget); } - else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.AirSwitch) + else if (device.Type == ZigBee.Device.DeviceType.AirSwitch) { SelectOnoffOutput(dialog, device, sceneTarget); } - else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.DimmableLight) + else if (device.Type == ZigBee.Device.DeviceType.DimmableLight) { SelectDimmableLight(dialog, device, sceneTarget); } - else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.WindowCoveringDevice) + else if (device.Type == ZigBee.Device.DeviceType.WindowCoveringDevice) { SelectWindowCoveringDevice(dialog, device, sceneTarget); } - else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.Thermostat) + else if (device.Type == ZigBee.Device.DeviceType.Thermostat) { SelectThermostat(dialog, device, sceneTarget); } @@ -455,7 +539,7 @@ /// <param name="dialog"></param> /// <param name="device"></param> /// <param name="sceneTarget"></param> - private void SelectOnoffOutput(FrameLayout dialog, DeviceUI device, SceneTargetDeviceUI sceneTarget) + private void SelectOnoffOutput(FrameLayout dialog, CommonDevice device, SceneTargetDeviceUI sceneTarget) { var selectFL = new FrameLayout { @@ -463,12 +547,12 @@ Height = Application.GetRealHeight(530), }; dialog.AddChidren(selectFL); - selectFL.Animate = Animate.DownToUp; + //selectFL.Animate = Animate.DownToUp; var titleBG = new FrameLayout { Height = Application.GetRealHeight(138 * 2), - Radius = (uint)Application.GetRealHeight(20), + Radius = (uint)Application.GetRealHeight(58), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; selectFL.AddChidren(titleBG); @@ -492,7 +576,7 @@ X = Application.GetRealWidth(80), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextGrayColor, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterLeft, TextID = R.MyInternationalizationString.Cancel }; @@ -500,12 +584,11 @@ var deviceName = new Button { - Width = Application.GetRealWidth(400), + Width = Application.GetRealWidth(600), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, - TextSize = 15, - TextAlignment = TextAlignment.CenterLeft, - Text = device.CommonDevice.DeviceEpointName + TextSize = 16, + Text = Common.LocalDevice.Current.GetDeviceEpointName(device) }; titleFL.AddChidren(deviceName); @@ -514,7 +597,7 @@ X = Application.GetRealWidth(800), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextSelectedColor2, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterRight, TextID = R.MyInternationalizationString.Complete }; @@ -612,7 +695,7 @@ /// <param name="dialog"></param> /// <param name="device"></param> /// <param name="sceneTarget"></param> - private void SelectWindowCoveringDevice(FrameLayout dialog, DeviceUI device, SceneTargetDeviceUI sceneTarget) + private void SelectWindowCoveringDevice(FrameLayout dialog, CommonDevice device, SceneTargetDeviceUI sceneTarget) { var selectFL = new FrameLayout { @@ -620,12 +703,12 @@ Height = Application.GetRealHeight(752), }; dialog.AddChidren(selectFL); - selectFL.Animate = Animate.DownToUp; + //selectFL.Animate = Animate.DownToUp; var titleBG = new FrameLayout { Height = Application.GetRealHeight(138 * 2), - Radius = (uint)Application.GetRealHeight(20), + Radius = (uint)Application.GetRealHeight(58), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; selectFL.AddChidren(titleBG); @@ -649,7 +732,7 @@ X = Application.GetRealWidth(80), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextGrayColor, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterLeft, TextID = R.MyInternationalizationString.Cancel }; @@ -657,12 +740,11 @@ var deviceName = new Button { - Width = Application.GetRealWidth(400), + Width = Application.GetRealWidth(600), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, - TextSize = 15, - TextAlignment = TextAlignment.CenterLeft, - Text = device.CommonDevice.DeviceEpointName + TextSize = 16, + Text = Common.LocalDevice.Current.GetDeviceEpointName(device) }; titleFL.AddChidren(deviceName); @@ -671,7 +753,7 @@ X = Application.GetRealWidth(800), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextSelectedColor2, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterRight, TextID = R.MyInternationalizationString.Complete }; @@ -715,7 +797,7 @@ dialog.RemoveFromParent(); }; - open.SeekBar.ProgressChanged += (sender, e) => + open.SeekBar.OnProgressChangedEvent += (sender, e) => { open.IsSelected = true; shut.IsSelected = false; @@ -724,7 +806,7 @@ if (sceneTarget.TaskList.Count > 0) { - if (sceneTarget.TaskList[0].Data1 == 0) + if (sceneTarget.TaskList[0].Data1 == 1) { open.IsSelected = false; shut.IsSelected = true; @@ -733,7 +815,7 @@ { open.IsSelected = true; shut.IsSelected = false; - open.SetProgress(sceneTarget.TaskList[0].Data1); + open.SetSeekBarProgress(sceneTarget.TaskList[0].Data2); } } @@ -748,14 +830,14 @@ if (shut.IsSelected) { //鍏� - data1 = 0; + data1 = 1; data2 = 0; } else { //鐧惧垎姣� - data1 = open.SeekBar.Progress; - data2 = 0; + data1 = 5; + data2 = open.SeekBar.Progress; } var taskInfo = new ZigBee.Device.Scene.TaskListInfo @@ -778,7 +860,7 @@ /// <param name="dialog"></param> /// <param name="device"></param> /// <param name="sceneTarget"></param> - private void SelectDimmableLight(FrameLayout dialog, DeviceUI device, SceneTargetDeviceUI sceneTarget) + private void SelectDimmableLight(FrameLayout dialog, CommonDevice device, SceneTargetDeviceUI sceneTarget) { var selectFL = new FrameLayout { @@ -786,12 +868,12 @@ Height = Application.GetRealHeight(752), }; dialog.AddChidren(selectFL); - selectFL.Animate = Animate.DownToUp; + //selectFL.Animate = Animate.DownToUp; var titleBG = new FrameLayout { Height = Application.GetRealHeight(138 * 2), - Radius = (uint)Application.GetRealHeight(20), + Radius = (uint)Application.GetRealHeight(58), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; selectFL.AddChidren(titleBG); @@ -815,7 +897,7 @@ X = Application.GetRealWidth(80), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextGrayColor, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterLeft, TextID = R.MyInternationalizationString.Cancel }; @@ -823,12 +905,12 @@ var deviceName = new Button { - Width = Application.GetRealWidth(400), + Width = Application.GetRealWidth(600), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, - TextSize = 15, + TextSize = 16, TextAlignment = TextAlignment.CenterLeft, - Text = device.CommonDevice.DeviceEpointName + Text = Common.LocalDevice.Current.GetDeviceEpointName(device) }; titleFL.AddChidren(deviceName); @@ -837,7 +919,7 @@ X = Application.GetRealWidth(800), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextSelectedColor2, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterRight, TextID = R.MyInternationalizationString.Complete }; @@ -881,7 +963,7 @@ dialog.RemoveFromParent(); }; - open.SeekBar.ProgressChanged += (sender, e) => + open.SeekBar.OnProgressChangedEvent += (sender, e) => { open.IsSelected = true; shut.IsSelected = false; @@ -899,7 +981,7 @@ { open.IsSelected = true; shut.IsSelected = false; - open.SetProgress(sceneTarget.TaskList[0].Data1); + open.SetSeekBarProgress(sceneTarget.TaskList[0].Data1); } } @@ -944,7 +1026,7 @@ /// <param name="dialog"></param> /// <param name="device"></param> /// <param name="sceneTarget"></param> - private void SelectThermostat(FrameLayout dialog, DeviceUI device, SceneTargetDeviceUI sceneTarget) + private void SelectThermostat(FrameLayout dialog, CommonDevice device, SceneTargetDeviceUI sceneTarget) { var selectFL = new FrameLayout { @@ -952,12 +1034,12 @@ Height = Application.GetRealHeight(1106), }; dialog.AddChidren(selectFL); - selectFL.Animate = Animate.DownToUp; + //selectFL.Animate = Animate.DownToUp; var titleBG = new FrameLayout { Height = Application.GetRealHeight(138 * 2), - Radius = (uint)Application.GetRealHeight(20), + Radius = (uint)Application.GetRealHeight(58), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; selectFL.AddChidren(titleBG); @@ -981,7 +1063,7 @@ X = Application.GetRealWidth(80), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextGrayColor, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterLeft, TextID = R.MyInternationalizationString.Cancel }; @@ -989,12 +1071,12 @@ var deviceName = new Button { - Width = Application.GetRealWidth(400), + Width = Application.GetRealWidth(600), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, - TextSize = 15, + TextSize = 16, TextAlignment = TextAlignment.CenterLeft, - Text = device.CommonDevice.DeviceEpointName + Text = Common.LocalDevice.Current.GetDeviceEpointName(device) }; titleFL.AddChidren(deviceName); @@ -1003,7 +1085,7 @@ X = Application.GetRealWidth(800), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextSelectedColor2, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterRight, TextID = R.MyInternationalizationString.Complete }; @@ -1081,12 +1163,9 @@ tempId = open.temperatureList.IndexOf(tasklist.Data2/100); } } - open.pickerView.setCurrentItems(tempId, modelId, fanid); } } - - comfrimBtn.MouseUpEventHandler = (sender, e) => { -- Gitblit v1.8.0