| | |
| | | using System; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using HDL_ON.UI.Music; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | |
| | | public partial class FunctionControlZone : FrameLayout |
| | | { |
| | | #region 区域控件 |
| | | static FrameLayout bodyDiv; |
| | | FunctionControlZone bodyDiv; |
| | | /// <summary> |
| | | /// 功能/场景icon |
| | | /// </summary> |
| | |
| | | /// 收藏按钮 |
| | | /// </summary> |
| | | Button btnCollectionIcon; |
| | | /// <summary> |
| | | /// 离线文本 |
| | | /// </summary> |
| | | Button btnOffline; |
| | | |
| | | #endregion |
| | | |
| | | #region 区域变量 |
| | |
| | | } |
| | | LoadDiv(); |
| | | |
| | | |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"; |
| | | |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"; |
| | | |
| | | if (SPK.CurtainSpkList().Contains(function.spk)) |
| | | {//窗帘没有开关按钮 |
| | |
| | | bodyDiv.AddChidren(btnCollectionIcon); |
| | | } |
| | | |
| | | if (!function.online) |
| | | { |
| | | bodyDiv.BackgroundColor = CSS_Color.PromptingColor2; |
| | | var btnOffline = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 10 + 32), |
| | | Y = Application.GetRealHeight(28 + 24), |
| | | Height = Application.GetRealHeight(30), |
| | | TextID = StringId.DeviceOffline, |
| | | TextColor = CSS_Color.WarningColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft |
| | | }; |
| | | bodyDiv.AddChidren(btnOffline); |
| | | } |
| | | //if (!function.online) |
| | | //{ |
| | | // bodyDiv.BackgroundColor = CSS_Color.PromptingColor2; |
| | | // btnOffline = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(8 + 10 + 32), |
| | | // Y = Application.GetRealHeight(28 + 24), |
| | | // Height = Application.GetRealHeight(30), |
| | | // TextID = StringId.DeviceOffline, |
| | | // TextColor = CSS_Color.WarningColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // TextAlignment = TextAlignment.CenterLeft |
| | | // }; |
| | | // bodyDiv.AddChidren(btnOffline); |
| | | //} |
| | | } |
| | | |
| | | /// <summary> |