| | |
| | | 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)) |
| | | {//窗帘没有开关按钮 |
| | | CurtainFragment(); |
| | |
| | | this.AddChidren(btnTipPowerLow); |
| | | } |
| | | } |
| | | } |
| | | else if (function.spk == SPK.DoorLock) |
| | | { |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/DoorLock.png"; |
| | | } |
| | | else |
| | | { |
| | |
| | | UnSelectedImagePath = "Collection/CollectionGrayIcon.png", |
| | | IsSelected = function.collect |
| | | }; |
| | | if ( !SPK.ArmSensorSpkList().Contains(function.spk) && !SPK.EnvironDeviceSpkList().Contains( function.spk))//!DB_ResidenceData.Instance.CurrentRegion.isOtherShare && |
| | | if ( !SPK.ArmSensorSpkList().Contains(function.spk) |
| | | && function.spk != SPK.DoorLock |
| | | && !SPK.EnvironDeviceSpkList().Contains( function.spk))//!DB_ResidenceData.Instance.CurrentRegion.isOtherShare && |
| | | { |
| | | bodyDiv.AddChidren(btnCollectionIcon); |
| | | } |
| | |
| | | if (!function.online) |
| | | { |
| | | bodyDiv.BackgroundColor = CSS_Color.PromptingColor2; |
| | | var btnOffline = new Button() |
| | | btnOffline = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 10 + 32), |
| | | Y = Application.GetRealHeight(28 + 24), |
| | |
| | | btnCurtainOpen.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainUpIcon.png"; |
| | | btnCurtainOpen.SelectedImagePath = "FunctionIcon/Curtain/CurtainUpIconOn.png"; |
| | | } |
| | | LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function); |
| | | LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose); |
| | | #endregion |
| | | } |
| | | /// <summary> |
| | |
| | | }; |
| | | bodyDiv.AddChidren(btnLastStates); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |