From 23fb45dd846ed8b62304c408c6bbe64265d4ac8b Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 20 十二月 2019 18:57:16 +0800
Subject: [PATCH] 代码合并
---
ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs | 43 +++++++++++++++++++++++++------------------
1 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs
index bb2ee90..da0dedc 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs
@@ -104,7 +104,7 @@
AddBodyView();
- RefreshBodyView();
+ RefreshBodyView(Config.Instance.Home.CurrentFloorId);
}
@@ -162,10 +162,10 @@
var floors = new SelectFloor();
AddChidren(floors);
floors.Init(580, 184, Direction.Right);
- floors.FloorAction += (floorName) =>
+ floors.FloorAction += (floorId) =>
{
- floorBtn.Text = floorName;
- RefreshBodyView();
+ floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId);
+ RefreshBodyView(floorId);
};
}
/// <summary>
@@ -187,15 +187,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()
{
@@ -216,7 +216,7 @@
bodyFrameLayout.AddChidren(functionSceneBodyView);
Button curBtn = new Button();
- foreach (var room in Common.Room.CurrentRoom.GetRoomsByCurrentFloorIdAppendLoveRoom())
+ foreach (var room in Common.Room.CurrentRoom.GetRoomsByFloorIdAppendLoveRoom(floorId))
{
var row = new FrameLayout()
{
@@ -302,6 +302,7 @@
};
functionSceneBodyView.AddChidren(deviceListScrolView);
tempFunctionTypeBtn = new FunctionButton();
+ tempFunctionTypeBtn.Init("","");
EventHandler<MouseEventArgs> ShowSameTypeFunction = (object typeSender, MouseEventArgs mouseEventArgs) =>
{
@@ -445,7 +446,7 @@
}
else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.Thermostat)
{
- SelectWindowCoveringDevice(dialog, device, sceneTarget);
+ SelectThermostat(dialog, device, sceneTarget);
}
}
@@ -463,6 +464,7 @@
Height = Application.GetRealHeight(530),
};
dialog.AddChidren(selectFL);
+ selectFL.Animate = Animate.DownToUp;
var titleBG = new FrameLayout
{
@@ -619,6 +621,7 @@
Height = Application.GetRealHeight(752),
};
dialog.AddChidren(selectFL);
+ selectFL.Animate = Animate.DownToUp;
var titleBG = new FrameLayout
{
@@ -722,7 +725,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 +734,7 @@
{
open.IsSelected = true;
shut.IsSelected = false;
- open.SetProgress(sceneTarget.TaskList[0].Data1);
+ open.SetProgress(sceneTarget.TaskList[0].Data2);
}
}
@@ -746,14 +749,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,6 +787,7 @@
Height = Application.GetRealHeight(752),
};
dialog.AddChidren(selectFL);
+ selectFL.Animate = Animate.DownToUp;
var titleBG = new FrameLayout
{
@@ -949,6 +953,7 @@
Height = Application.GetRealHeight(1106),
};
dialog.AddChidren(selectFL);
+ selectFL.Animate = Animate.DownToUp;
var titleBG = new FrameLayout
{
@@ -1074,13 +1079,15 @@
}
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);
}
}
+
+
comfrimBtn.MouseUpEventHandler = (sender, e) =>
{
@@ -1120,7 +1127,7 @@
{
TaskType = taskType,
Data1 = 3,
- Data2 = open.modeList[fanid]
+ Data2 = open.modeList[modelId]
};
taskList.Add(taskInfo2);
@@ -1132,7 +1139,7 @@
{
TaskType = taskType,
Data1 = 4,
- Data2 = open.temperatureList[tempId]
+ Data2 = open.temperatureList[tempId]*100
};
taskList.Add(taskInfo3);
@@ -1144,7 +1151,7 @@
{
TaskType = taskType,
Data1 = 5,
- Data2 = open.temperatureList[tempId]
+ Data2 = open.temperatureList[tempId]*100
};
taskList.Add(taskInfo3);
}
--
Gitblit v1.8.0