wxr
2020-11-12 a715181089be0d31cd737a5367ffd02690b9d77f
HDL_ON/UI/UI2/FuntionControlView/Light/RelayPage.cs
@@ -9,7 +9,7 @@
    {
        #region 控件集合
        FrameLayout bodyView;
        static RelayPage bodyView;
        /// <summary>
        /// 控制界面加载区域
        /// </summary>
@@ -38,18 +38,43 @@
        #region 区域变量
        Light light;
        Button btnCollection_Out;
        Button btnFunctionName_Out;
        Button btnFromFloor_Out;
        /// <summary>
        /// 刷新显示信息
        /// </summary>
        Action actionRefresh;
        #endregion
        public RelayPage(Light func)
        {
            bodyView = this;
            light = func;
        }
        public void LoadPage()
        }
        /// <summary>
        /// 加载界面
        /// </summary>
        /// <param name="btnCollectionIcon">收藏按钮</param>
        /// <param name="btnFunctionName">功能名称信息按钮</param>
        /// <param name="btnFromFloor">功能楼层信息按钮</param>
        public void LoadPage(Button btnCollectionIcon, Button btnFunctionNameOut, Button btnFromFloorOut)
        {
            if (btnCollectionIcon == null)
            {
                btnCollection_Out = new Button();
                btnFunctionName_Out = new Button();
                btnFromFloor_Out = new Button();
            }
            else
            {
                btnCollection_Out = btnCollectionIcon;
                btnFunctionName_Out = btnFunctionNameOut;
                btnFromFloor_Out = btnFromFloorOut;
            }
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Lights), light);
            //new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Lights), light);
            controlView = new FrameLayout()
            {
@@ -105,9 +130,9 @@
                Y = Application.GetRealHeight(102),
                Width = Application.GetRealWidth(168),
                Height = Application.GetRealHeight(288),
                UnSelectedImagePath = "FunctionIcon/Light/RelayCloseIcon.png",
                SelectedImagePath = "FunctionIcon/Light/RelayOpenIcon.png",
                IsSelected = light.state != 0
                UnSelectedImagePath = "FunctionIcon/Light/RelayBg.png",
                SelectedImagePath = "FunctionIcon/Light/RelayOnBg.png",
                IsSelected = light.trait_on_off.value.ToString() == "on"
            };
            controlView.AddChidren(btnSwitchIcon);
@@ -119,12 +144,13 @@
                Height = Application.GetMinRealAverage(40),
                UnSelectedImagePath = "Public/PowerClose.png",
                SelectedImagePath = "Public/PowerOpen.png",
                IsSelected = light.state != 0
                IsSelected = light.trait_on_off.value.ToString() == "on"
            };
            controlView.AddChidren(btnSwitch);
            LoadEventList();
            new TopViewDiv(bodyView, Language.StringByID(StringId.Lights)).LoadTopView_FunctionTop(light, actionRefresh);
        }
    }