wxr
2020-08-11 2bec9c838d2d688025698de8ec1de401ffd7dd1f
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()
            {
@@ -103,11 +128,12 @@
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(102),
                Width = Application.GetRealWidth(168),
                Width = Application.GetRealWidth(168-40),
                Height = Application.GetRealHeight(288),
                UnSelectedImagePath = "FunctionIcon/Light/RelayCloseIcon.png",
                SelectedImagePath = "FunctionIcon/Light/RelayOpenIcon.png",
                IsSelected = light.state != 0
                BackgroundColor = CSS_Color.PromptingColor2,
                SelectedBackgroundColor= CSS_Color.AuxiliaryColor1,
                Radius = (uint)Application.GetRealWidth(40),
                IsSelected = light.on_off == "on"
            };
            controlView.AddChidren(btnSwitchIcon);
@@ -119,12 +145,13 @@
                Height = Application.GetMinRealAverage(40),
                UnSelectedImagePath = "Public/PowerClose.png",
                SelectedImagePath = "Public/PowerOpen.png",
                IsSelected = light.state != 0
                IsSelected = light.on_off == "on"
            };
            controlView.AddChidren(btnSwitch);
            LoadEventList();
            new TopViewDiv(bodyView, Language.StringByID(StringId.Lights)).LoadTopView(light, actionRefresh);
        }
    }