| | |
| | | /// <summary> |
| | | /// ZoneBtn |
| | | /// </summary> |
| | | private Button ZoneBtn; |
| | | private Button StatuBtn; |
| | | /// <summary> |
| | | /// ClickBtn |
| | | /// </summary> |
| | |
| | | v_Selected = value; |
| | | try |
| | | { |
| | | SetStatu(v_Selected); |
| | | SetOnLineStatu(v_Selected); |
| | | } |
| | | catch |
| | | { |
| | |
| | | }; |
| | | AddChidren(NameBtn); |
| | | |
| | | ZoneBtn = new Button |
| | | StatuBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(181), |
| | | Y = Application.GetRealHeight(72), |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2 |
| | | }; |
| | | AddChidren(ZoneBtn); |
| | | AddChidren(StatuBtn); |
| | | |
| | | SwitchBtn = new Button() |
| | | { |
| | |
| | | /// 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> |
| | |
| | | /// <param name="statu"></param> |
| | | public void HideSwitchBtn(bool statu) |
| | | { |
| | | SwitchBtn.Visible = statu; |
| | | SwitchBtn.Visible = !statu; |
| | | } |
| | | } |
| | | } |