| | |
| | | /// <summary> |
| | | /// SwitchBtn |
| | | /// </summary> |
| | | public CommonForm.SelectedStatuButton SwitchBtn; |
| | | public Button SwitchBtn; |
| | | /// <summary> |
| | | /// ClickBtn |
| | | /// </summary> |
| | | public Button ClickBtn; |
| | | /// <summary> |
| | | /// v_Selected |
| | | /// </summary> |
| | |
| | | { |
| | | X = Application.GetRealWidth(x); |
| | | Y = Application.GetRealHeight(y); |
| | | Width = Application.GetRealWidth(1022); |
| | | Width = Application.GetRealWidth(1080); |
| | | Height = Application.GetRealHeight(127); |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="imagePath"></param> |
| | | /// <param name="selectedImagePath"></param> |
| | | public void Init(string imagePath, string selectedImagePath) |
| | | public void Init(string imagePath, string selectedImagePath,bool click=false) |
| | | { |
| | | ImageBG = new Button() |
| | | { |
| | |
| | | |
| | | NameBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(181), |
| | | X = Application.GetRealWidth(200), |
| | | Width = Application.GetRealWidth(500), |
| | | Height = Application.GetRealHeight(80), |
| | | Gravity = Gravity.CenterVertical, |
| | |
| | | }; |
| | | AddChidren(NameBtn); |
| | | |
| | | SwitchBtn = new SelectedStatuButton() |
| | | SwitchBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(896), |
| | | Width = Application.GetMinRealAverage(78), |
| | |
| | | |
| | | var line = new Button() |
| | | { |
| | | X = Application.GetRealWidth(180), |
| | | X = Application.GetRealWidth(200), |
| | | Y = Height - 2, |
| | | Width = Application.GetRealWidth(841), |
| | | Width = Application.GetRealWidth(821), |
| | | Height = 2, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor, |
| | | Tag = Tag |
| | | }; |
| | | AddChidren(line); |
| | | |
| | | ClickBtn = new Button(); |
| | | if (click) |
| | | { |
| | | AddChidren(ClickBtn); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | NameBtn.IsSelected = ImageBG.IsSelected = ImageBtn.IsSelected = SwitchBtn.IsSelected = statu; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// HideSwitchBtn |
| | | /// </summary> |
| | | /// <param name="statu"></param> |
| | | public void HideSwitchBtn(bool statu) |
| | | { |
| | | SwitchBtn.Visible = statu; |
| | | } |
| | | } |
| | | } |