| | |
| | | }; |
| | | bodyView.AddChidren(topView); |
| | | |
| | | if (DB_ResidenceData.Instance.GatewayType == 0) |
| | | //不是A网关或者是成员 只允许添加场景隐藏自动化 |
| | | if (DB_ResidenceData.Instance.GatewayType != 1 || DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) |
| | | { |
| | | btnSceneTilte = new Button() |
| | | { |
| | |
| | | }; |
| | | topView.AddChidren(btnSceneTilte); |
| | | btnAutomationTitle = new Button(); |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | if (!btnAutomationTitle.IsSelected) |
| | | { |
| | | //如果是成员 |
| | | if (DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) |
| | | { |
| | | //如果没有场景权限 |
| | | if (!DB_ResidenceData.Instance.CurrentRegion.isAllowCreateScene) |
| | | { |
| | | //提示没有场景的创建权限 |
| | | Utlis.ShowTip(Language.StringByID(StringId.PermissionDenied)); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | Action action = () => |
| | | { |
| | | LoadSceneFunctionControlZone(); |