黄学彪
2019-11-04 c7698e163e43cea9e7f8ee45f8e3f91c9265cca4
ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs
@@ -23,7 +23,7 @@
        /// <summary>
        /// ZoneBtn
        /// </summary>
        private Button ZoneBtn;
        private Button StatuBtn;
        /// <summary>
        /// ClickBtn
        /// </summary>
@@ -42,7 +42,7 @@
                v_Selected = value;
                try
                {
                    SetStatu(v_Selected);
                    SetOnLineStatu(v_Selected);
                }
                catch
                {
@@ -114,7 +114,7 @@
            };
            AddChidren(NameBtn);
            ZoneBtn = new Button
            StatuBtn = new Button
            {
                X = Application.GetRealWidth(181),
                Y = Application.GetRealHeight(72),
@@ -123,7 +123,7 @@
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2
            };
            AddChidren(ZoneBtn);
            AddChidren(StatuBtn);
            SwitchBtn = new Button()
            {
@@ -176,18 +176,26 @@
        /// SetZoneText
        /// </summary>
        /// <param name="title"></param>
        public void SetZoneText(string title)
        public void SetStatuText(string title)
        {
            ZoneBtn.Text = title;
            StatuBtn.Text = title;
        }
        /// <summary>
        /// SetStatu
        /// </summary>
        /// <param name="statu"></param>
        public void SetStatu(bool statu)
        {
            NameBtn.IsSelected = ImageBG.IsSelected = ImageBtn.IsSelected = SwitchBtn.IsSelected = statu;
            SwitchBtn.IsSelected = statu;
        }
        /// <summary>
        /// SetStatu
        /// </summary>
        /// <param name="statu"></param>
        public void SetOnLineStatu(bool statu)
        {
            NameBtn.IsSelected = ImageBG.IsSelected = ImageBtn.IsSelected =  statu;
        }
        /// <summary>
@@ -196,7 +204,7 @@
        /// <param name="statu"></param>
        public void HideSwitchBtn(bool statu)
        {
            SwitchBtn.Visible = statu;
            SwitchBtn.Visible = !statu;
        }
    }
}