| | |
| | | /// </summary> |
| | | Button btnBack; |
| | | |
| | | public Button btnTilte; |
| | | /// <summary> |
| | | /// 标题名称 |
| | | /// </summary> |
| | |
| | | /// 后退时触发对事件 |
| | | /// </summary> |
| | | Action backAction; |
| | | |
| | | public int maginY = 0; |
| | | |
| | | public TopViewDiv(FrameLayout frame, string str) |
| | | { |
| | |
| | | /// </summary> |
| | | /// <param name="frame"></param> |
| | | /// <param name="tilte"></param> |
| | | public void LoadTopView() |
| | | public void LoadTopView(uint color = CSS_Color.TopViewColor)//,Action<List<Function> action |
| | | { |
| | | contentView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(64), |
| | | BackgroundColor = CSS_Color.TopViewColor, |
| | | Height = Application.GetRealHeight(64+ maginY), |
| | | BackgroundColor = color, |
| | | }; |
| | | baseView.AddChidren(contentView); |
| | | |
| | | Button btnBackIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(10), |
| | | Y = Application.GetRealHeight(29), |
| | | Y = Application.GetRealHeight(29 + maginY), |
| | | Width = Application.GetRealWidth(40), |
| | | Height = Application.GetRealWidth(28), |
| | | UnSelectedImagePath = "Public/BackIcon.png", |
| | | }; |
| | | contentView.AddChidren(btnBackIcon); |
| | | |
| | | Button btnTilte = new Button() |
| | | btnTilte = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(30), |
| | | Y = Application.GetRealHeight(30 + maginY), |
| | | Width = Application.GetRealWidth(270), |
| | | Height = Application.GetRealHeight(25), |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | Text = title |
| | | }; |
| | | contentView.AddChidren(btnTilte); |
| | | |
| | | |
| | | |
| | | btnBack = new Button() |
| | |
| | | var btnSetting = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(29), |
| | | Y = Application.GetRealHeight(29 + maginY), |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "Public/FuncInfoSetIcon.png", |
| | |
| | | |
| | | var btnSetting = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(29), |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "FunctionIcon/Light/LightScene/SetLightSceneIcon.png", |
| | | X = Application.GetRealWidth(337-37), |
| | | Y = Application.GetRealHeight(20 + maginY), |
| | | Width = Application.GetMinRealAverage(28+37), |
| | | Height = Application.GetMinRealAverage(28+19), |
| | | TextID = StringId.CombinedDimming, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.MainColor, |
| | | IsMoreLines = true |
| | | //UnSelectedImagePath = "FunctionIcon/Light/LightScene/SetLightSceneIcon.png", |
| | | }; |
| | | |
| | | contentView.AddChidren(btnSetting); |
| | |
| | | public void LoadTopView_FunctionTop(Function function, Action action,bool locationSet = true) |
| | | { |
| | | backAction = action; |
| | | maginY = 10; |
| | | |
| | | LoadTopView(); |
| | | |
| | | var btnSetting = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(28), |
| | | Y = Application.GetRealHeight(28 + maginY), |
| | | Width = Application.GetMinRealAverage(32), |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "Public/FuncInfoSetIcon.png", |
| | |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 房间标题区域 |
| | | /// </summary> |
| | |
| | | var btnSetting = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(29), |
| | | Y = Application.GetRealHeight(29 + maginY), |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "Public/FuncInfoSetIcon.png", |
| | |
| | | /// <param name="room"></param> |
| | | /// <param name="skipAction"></param> |
| | | /// <param name="text"></param> |
| | | public void LoadTopView_SettingText(Action skipAction,string text) |
| | | public void LoadTopView_SettingText(Action skipAction,string text,bool isDelColor = false) |
| | | { |
| | | LoadTopView(); |
| | | |
| | | var btnSetting = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337-100), |
| | | Y = Application.GetRealHeight(29), |
| | | X = Application.GetRealWidth(355-100), |
| | | Y = Application.GetRealHeight(29 + maginY), |
| | | Width = Application.GetMinRealAverage(100), |
| | | Height = Application.GetMinRealAverage(28), |
| | | TextColor = CSS_Color.MainColor, |
| | | TextColor = isDelColor ?CSS_Color.WarningColor: CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | Text = text, |
| | |
| | | var btnAddIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(29), |
| | | Y = Application.GetRealHeight(29 + maginY), |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "Public/AddIcon.png", |
| | |
| | | { |
| | | callBack("", ""); |
| | | } |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 向framelayout添加顶部区域,添加第三方平台 |
| | | /// </summary> |
| | | /// <param name="frame"></param> |
| | | /// <param name="tilte"></param> |
| | | public void LoadTopView_Add3tyIot( Action<string, string> callBack) |
| | | { |
| | | LoadTopView(CSS_Color.MainBackgroundColor); |
| | | |
| | | var btnAddIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(29 + maginY), |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "Public/LinkIotIcon.png", |
| | | }; |
| | | contentView.AddChidren(btnAddIcon); |
| | | |
| | | btnAddIcon.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | var page = new Iot_BrandListPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 向framelayout添加顶部区域,第三方平台 |
| | | /// </summary> |
| | | public void LoadTopView_3tyIot(Action action) |
| | | { |
| | | LoadTopView(CSS_Color.MainBackgroundColor); |
| | | |
| | | var btnAddIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(29 + maginY), |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "Public/Iot_agreement_icon.png", |
| | | }; |
| | | contentView.AddChidren(btnAddIcon); |
| | | |
| | | btnAddIcon.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | action(); |
| | | }; |
| | | } |
| | | |
| | |
| | | var btnAddIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(29), |
| | | Y = Application.GetRealHeight(29 + maginY), |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "Public/AddIcon.png", |
| | |
| | | var btnAddIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(29), |
| | | Y = Application.GetRealHeight(29+maginY), |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "Public/AddIcon.png", |