From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28
---
ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs | 362 +++++++++++++++++++++++++++++++-------------------
1 files changed, 223 insertions(+), 139 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs
old mode 100755
new mode 100644
index 682e1f0..77d71a7
--- 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;
@@ -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<DeviceUI> devList;
+ /// <summary>
+ /// 鐩稿悓绫诲瀷鐨勮澶囧垪琛�
+ /// </summary>
+ private Dictionary<int, List<DeviceUI>> 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 };
@@ -104,9 +130,50 @@
AddBodyView();
- RefreshBodyView();
+ RefreshBodyView(Config.Instance.Home.CurrentFloorId);
}
+ /// <summary>
+ /// InitData
+ /// </summary>
+ private void InitData()
+ {
+ typeDeviceDic = new Dictionary<int, List<DeviceUI>> { };
+ typeIdDic = new Dictionary<int, DeviceConcreteType> { };
+ }
+
+ /// <summary>
+ /// RefreshData
+ /// </summary>
+ private void RefreshData(Common.Room room)
+ {
+ devList = room.DeviceUIList;
+ typeDeviceDic.Clear();
+ typeIdDic.Clear();
+ foreach (var device in devList)
+ {
+ 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璋冨厜鍣�
+ )
+ {
+ if (typeDeviceDic.ContainsKey(info.BeloneTextId) == false)
+ {
+ var sameDevList = new List<DeviceUI> { };
+ 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,11 +230,14 @@
{
var floors = new SelectFloor();
AddChidren(floors);
+ floors.changeFloor = false;
+ floors.CurFloorId = curFloorId;
floors.Init(580, 184, Direction.Right);
- floors.FloorAction += (floorName) =>
+ floors.FloorAction += (floorId) =>
{
- floorBtn.Text = floorName;
- RefreshBodyView();
+ curFloorId = floorId;
+ floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId);
+ RefreshBodyView(floorId);
};
}
/// <summary>
@@ -187,15 +259,15 @@
/// <summary>
/// RefreshBodyView
/// </summary>
- private void RefreshBodyView()
+ private void RefreshBodyView(string floorId)
{
- AddRoomView();
+ AddRoomView(floorId);
}
/// <summary>
/// AddRoomView
/// </summary>
- private void AddRoomView()
+ private void AddRoomView(string floorId)
{
var roomFL = new HorizontalScrolViewLayout()
{
@@ -210,54 +282,44 @@
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.GetRoomsByCurrentFloorIdAppendLoveRoom())
+ RoomButton curBtn = new RoomButton(0, 0);
+ foreach (var room in Common.Room.CurrentRoom.GetRoomsByFloorIdAppendLoveRoom(floorId))
{
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 +337,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<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)
+ {
+ 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.CommonDevice));
+ deviceRow.IsSelected = true;
+ deviceRow.HideSwitchBtn(false);
+ deviceRow.NameBtn.BackgroundColor = ZigbeeColor.Current.GXCRedColor;
+ deviceTypeRowLayout.AddChidren(deviceRow);
+
+
+ deviceRow.ClickBtn.MouseUpEventHandler += (sender, e) =>
+ {
+ ShowSelectAction(device, sceneTargetDevice);
+ };
+ }
+ }
+
/// <summary>
/// 鎻愮ず娌℃湁鍔熻兘
@@ -463,11 +546,12 @@
Height = Application.GetRealHeight(530),
};
dialog.AddChidren(selectFL);
+ //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);
@@ -491,7 +575,7 @@
X = Application.GetRealWidth(80),
Width = Application.GetRealWidth(200),
TextColor = ZigbeeColor.Current.GXCTextGrayColor,
- TextSize = 15,
+ TextSize = 14,
TextAlignment = TextAlignment.CenterLeft,
TextID = R.MyInternationalizationString.Cancel
};
@@ -499,12 +583,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.CommonDevice)
};
titleFL.AddChidren(deviceName);
@@ -513,7 +596,7 @@
X = Application.GetRealWidth(800),
Width = Application.GetRealWidth(200),
TextColor = ZigbeeColor.Current.GXCTextSelectedColor2,
- TextSize = 15,
+ TextSize = 14,
TextAlignment = TextAlignment.CenterRight,
TextID = R.MyInternationalizationString.Complete
};
@@ -619,11 +702,12 @@
Height = Application.GetRealHeight(752),
};
dialog.AddChidren(selectFL);
+ //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);
@@ -647,7 +731,7 @@
X = Application.GetRealWidth(80),
Width = Application.GetRealWidth(200),
TextColor = ZigbeeColor.Current.GXCTextGrayColor,
- TextSize = 15,
+ TextSize = 14,
TextAlignment = TextAlignment.CenterLeft,
TextID = R.MyInternationalizationString.Cancel
};
@@ -655,12 +739,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.CommonDevice)
};
titleFL.AddChidren(deviceName);
@@ -669,7 +752,7 @@
X = Application.GetRealWidth(800),
Width = Application.GetRealWidth(200),
TextColor = ZigbeeColor.Current.GXCTextSelectedColor2,
- TextSize = 15,
+ TextSize = 14,
TextAlignment = TextAlignment.CenterRight,
TextID = R.MyInternationalizationString.Complete
};
@@ -713,7 +796,7 @@
dialog.RemoveFromParent();
};
- open.SeekBar.ProgressChanged += (sender, e) =>
+ open.SeekBar.OnProgressChangedEvent += (sender, e) =>
{
open.IsSelected = true;
shut.IsSelected = false;
@@ -722,7 +805,7 @@
if (sceneTarget.TaskList.Count > 0)
{
- if (sceneTarget.TaskList[0].Data1 == 0)
+ if (sceneTarget.TaskList[0].Data1 == 1)
{
open.IsSelected = false;
shut.IsSelected = true;
@@ -731,7 +814,7 @@
{
open.IsSelected = true;
shut.IsSelected = false;
- open.SetProgress(sceneTarget.TaskList[0].Data1);
+ open.SetSeekBarProgress(sceneTarget.TaskList[0].Data2);
}
}
@@ -746,14 +829,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
@@ -784,11 +867,12 @@
Height = Application.GetRealHeight(752),
};
dialog.AddChidren(selectFL);
+ //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);
@@ -812,7 +896,7 @@
X = Application.GetRealWidth(80),
Width = Application.GetRealWidth(200),
TextColor = ZigbeeColor.Current.GXCTextGrayColor,
- TextSize = 15,
+ TextSize = 14,
TextAlignment = TextAlignment.CenterLeft,
TextID = R.MyInternationalizationString.Cancel
};
@@ -820,12 +904,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.CommonDevice)
};
titleFL.AddChidren(deviceName);
@@ -834,7 +918,7 @@
X = Application.GetRealWidth(800),
Width = Application.GetRealWidth(200),
TextColor = ZigbeeColor.Current.GXCTextSelectedColor2,
- TextSize = 15,
+ TextSize = 14,
TextAlignment = TextAlignment.CenterRight,
TextID = R.MyInternationalizationString.Complete
};
@@ -878,7 +962,7 @@
dialog.RemoveFromParent();
};
- open.SeekBar.ProgressChanged += (sender, e) =>
+ open.SeekBar.OnProgressChangedEvent += (sender, e) =>
{
open.IsSelected = true;
shut.IsSelected = false;
@@ -896,7 +980,7 @@
{
open.IsSelected = true;
shut.IsSelected = false;
- open.SetProgress(sceneTarget.TaskList[0].Data1);
+ open.SetSeekBarProgress(sceneTarget.TaskList[0].Data1);
}
}
@@ -949,11 +1033,12 @@
Height = Application.GetRealHeight(1106),
};
dialog.AddChidren(selectFL);
+ //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);
@@ -977,7 +1062,7 @@
X = Application.GetRealWidth(80),
Width = Application.GetRealWidth(200),
TextColor = ZigbeeColor.Current.GXCTextGrayColor,
- TextSize = 15,
+ TextSize = 14,
TextAlignment = TextAlignment.CenterLeft,
TextID = R.MyInternationalizationString.Cancel
};
@@ -985,12 +1070,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.CommonDevice)
};
titleFL.AddChidren(deviceName);
@@ -999,7 +1084,7 @@
X = Application.GetRealWidth(800),
Width = Application.GetRealWidth(200),
TextColor = ZigbeeColor.Current.GXCTextSelectedColor2,
- TextSize = 15,
+ TextSize = 14,
TextAlignment = TextAlignment.CenterRight,
TextID = R.MyInternationalizationString.Complete
};
@@ -1074,10 +1159,9 @@
}
if (tasklist.Data1 == 4 || tasklist.Data1 == 5)
{
- tempId = open.temperatureList.IndexOf(tasklist.Data2);
+ tempId = open.temperatureList.IndexOf(tasklist.Data2/100);
}
}
-
open.pickerView.setCurrentItems(tempId, modelId, fanid);
}
}
@@ -1132,7 +1216,7 @@
{
TaskType = taskType,
Data1 = 4,
- Data2 = open.temperatureList[tempId]
+ Data2 = open.temperatureList[tempId]*100
};
taskList.Add(taskInfo3);
@@ -1144,7 +1228,7 @@
{
TaskType = taskType,
Data1 = 5,
- Data2 = open.temperatureList[tempId]
+ Data2 = open.temperatureList[tempId]*100
};
taskList.Add(taskInfo3);
}
--
Gitblit v1.8.0