| | |
| | | try |
| | | { |
| | | int index = 0; |
| | | var list = FunctionList.List.GetDeviceFunctionList(); |
| | | var list = new List<Function>(); |
| | | list.AddRange(FunctionList.List.GetDeviceFunctionList()); |
| | | list.AddRange(FunctionList.List.groupControls);//加入群控 |
| | | foreach (var function in list) |
| | | { |
| | |
| | | btnState.Text = function.lastState; |
| | | } |
| | | } |
| | | |
| | | else |
| | | { |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; |
| | |
| | | SelectedImagePath = "Public/SwitchOn.png", |
| | | }; |
| | | view.AddChidren(btnSwitch); |
| | | |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; |
| | | btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png"; |
| | | if (function.spk == SPK.GroupControl) |
| | | { |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png"; |
| | | btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png"; |
| | | } |
| | | else |
| | | { |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; |
| | | btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png"; |
| | | } |
| | | LoadEvent_SwitchFunction(function, btnSwitch); |
| | | } |
| | | //取消收藏事件 |