using System; using HDL_ON.UI.UI2.Intelligence.Automation.LogicView; using Shared; namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice { public class Matching : FrameLayout { public Matching() { } public void Show() { #region 界面布局 this.BackgroundColor = CSS.CSS_Color.viewMiddle; PirDevice.View.TopView topView = new View.TopView(); topView.topNameBtn.TextID = StringId.pipeiyaokongqi; this.AddChidren(topView.FLayoutView()); topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); }; FrameLayout fLayout = new FrameLayout { Y = topView.frameLayout.Bottom, Height = Application.GetRealHeight(667 - 64), Width = Application.GetRealWidth(375), }; this.AddChidren(fLayout); //请点击以下按钮 Button text1Btn = new Button { Y = Application.GetRealHeight(60), X = Application.GetRealWidth(16), Width = Application.GetRealWidth(375 - 32), Height = Application.GetRealHeight(20), TextID = StringId.dianjianniu, TextSize = TextSize.text14, TextColor = CSS.CSS_Color.textColor, TextAlignment = TextAlignment.Center, }; fLayout.AddChidren(text1Btn); //确认设备是否有响应 Button text2Btn = new Button { Y = Application.GetRealHeight(60 + 24), X = Application.GetRealWidth(16), Width = Application.GetRealWidth(375 - 32), Height = Application.GetRealHeight(20), TextID = StringId.shifouyouxiangying, TextSize = TextSize.text14, TextColor = CSS.CSS_Color.textColor, TextAlignment = TextAlignment.Center, }; fLayout.AddChidren(text2Btn); //左 var leftIconBtn = new Button { Y = Application.GetRealHeight(203), X = Application.GetRealWidth(16), Width = Application.GetRealWidth(36), Height = Application.GetRealWidth(36), UnSelectedImagePath = "PirIcon/left.png", }; fLayout.AddChidren(leftIconBtn); //右 var rightIconBtn = new Button { Y = Application.GetRealHeight(203), X = Application.GetRealWidth(323), Width = Application.GetRealWidth(36), Height = Application.GetRealWidth(36), UnSelectedImagePath = "PirIcon/right.png", }; fLayout.AddChidren(rightIconBtn); //测试功能 var testBtn = new Button { Y = Application.GetRealHeight(199), X = Application.GetRealWidth(136), Width = Application.GetRealWidth(104), Height = Application.GetRealHeight(44), Text = "电源", TextSize = TextSize.text16, TextColor = CSS.CSS_Color.textColor, TextAlignment = TextAlignment.Center, Radius = (uint)Application.GetRealHeight(18), BorderWidth = 1, BorderColor = CSS.CSS_Color.textCancelColor, }; fLayout.AddChidren(testBtn); // 5/10 Button sumBtn = new Button { Y = Application.GetRealHeight(267), X = Application.GetRealWidth(170), Width = Application.GetRealWidth(36), Height = Application.GetRealHeight(17), Text = "(" + "1" + "/20)", TextSize = TextSize.text12, TextColor = CSS.CSS_Color.textCancelColor, }; fLayout.AddChidren(sumBtn); //控制失败 var failedBtn = new Button { Y = Application.GetRealHeight(521), X = Application.GetRealWidth(52), Width = Application.GetRealWidth(124), Height = Application.GetRealHeight(44), TextID = StringId.kongzhishibai, TextSize = TextSize.text16, TextColor = CSS.CSS_Color.textConfirmColor, TextAlignment = TextAlignment.Center, Radius = (uint)Application.GetRealHeight(44), BorderWidth = 1, BorderColor = CSS.CSS_Color.textConfirmColor, }; fLayout.AddChidren(failedBtn); //控制成功 var succeedBtn = new Button { Y = Application.GetRealHeight(521), X = Application.GetRealWidth(196), Width = Application.GetRealWidth(124), Height = Application.GetRealHeight(44), TextID = StringId.kongzhichenggong, TextSize = TextSize.text16, TextColor = CSS.CSS_Color.textWhiteColor, TextAlignment = TextAlignment.Center, Radius = (uint)Application.GetRealHeight(44), //BorderWidth = 1, //BorderColor = CSS.CSS_Color.textConfirmColor, BackgroundColor = CSS.CSS_Color.textConfirmColor, }; fLayout.AddChidren(succeedBtn); #endregion #region 点击事件 int value = 1; leftIconBtn.MouseUpEventHandler += (sender, e) => { }; rightIconBtn.MouseUpEventHandler += (sender, e) => { }; #endregion } } }