| | |
| | | /// <summary> |
| | | /// 显示功能Row |
| | | /// </summary> |
| | | void LoadFunctionListRow(List<Function> functions) |
| | | void LoadFunctionListRow(List<Function> functions, bool isAppend = false) |
| | | { |
| | | functionListView.RemoveAll(); |
| | | if (functions == null)
|
| | | {
|
| | | //初始值
|
| | |
| | | functions.AddRange(unallocatedList);
|
| | | functions.AddRange(allocatedList);
|
| | | } |
| | | foreach (var function in functions) |
| | | if (!isAppend) |
| | | { |
| | | showCount = -1; |
| | | functionListView.RemoveAll(); |
| | | } |
| | | for (var i = 0; i < 100; i++) |
| | | //foreach (var function in functions) |
| | | { |
| | | showCount++; |
| | | if (showCount >= functions.Count) |
| | | { |
| | | break; |
| | | } |
| | | var function = functions[showCount]; |
| | | if (!MainPage.SceneSupportFunctionList.Contains(function.spk)) |
| | | { |
| | | continue; |
| | |
| | | }; |
| | | functionRow.AddChidren(btnChooseIcon); |
| | | LoadEvent_SkipEditFunctionInfo(functionRow, btnFunctionFloorName, btnChooseIcon, btnFunctionName, function); |
| | | |
| | | } |
| | | if (functions.Count > showCount) |
| | | { |
| | | var btnAppend = new Button() |
| | | { |
| | | Height = Application.GetRealHeight(60), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextID = StringId.LoadMore, |
| | | }; |
| | | functionListView.AddChidren(btnAppend); |
| | | btnAppend.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnAppend.RemoveFromParent(); |
| | | LoadFunctionListRow(functions, true); |
| | | }; |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示的设备的总数 |
| | | /// </summary> |
| | | int showCount = -1; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 住宅列表点击事件 |