From 84fa7c9665d9bed9aef79237be9c5eb57c49f13d Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期五, 05 三月 2021 10:54:37 +0800 Subject: [PATCH] Merge branch 'CJL' into ez-test --- HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs | 244 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 244 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs new file mode 100644 index 0000000..8ba618f --- /dev/null +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs @@ -0,0 +1,244 @@ +锘縰sing System; +using HDL_ON.UI.UI2.Intelligence.Automation.LogicView; +using Shared; +using System.Collections.Generic; +using System.Text; +namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice +{ + public class DeviceSet : FrameLayout + { + public DeviceSet() + { + Tag = "PirView"; + } + public void Show() { + #region 鐣岄潰甯冨眬 + this.BackgroundColor = CSS.CSS_Color.viewMiddle; + PirDevice.View.TopView topView = new View.TopView(); + topView.topNameBtn.TextID = StringId.shebeigaunli; + topView.topIconBtn.Visible = true; + this.AddChidren(topView.FLayoutView()); + topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); }; + VerticalScrolViewLayout vv = new VerticalScrolViewLayout(); + vv.Height = Application.GetRealHeight(667 - 64); + vv.Y = Application.GetRealHeight(64); + this.AddChidren(vv); + #endregion + int a = 3; + int b = 3; + for (int i = 0; i < b; i++) + { + #region 绾㈠瀹濆浘鏍� 鐗堟湰鍙� 鍚嶇О 鐘舵�� + FrameLayout fLayout = new FrameLayout + { + Width = Application.GetRealWidth(375), + Height = Application.GetRealHeight(12+92+(50* a)), + }; + vv.AddChidren(fLayout); + + //绾㈠瀹濇樉绀虹埗鎺т欢 + FrameLayout devfLayout = new FrameLayout + { + Y = Application.GetRealHeight(12), + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(375-16*2), + Height = Application.GetRealHeight(92 + (50 * a)), + BackgroundColor = CSS.CSS_Color.view, + Radius = (uint)Application.GetRealHeight(12), + }; + fLayout.AddChidren(devfLayout); + //绾㈠瀹濆浘鏍� + Button priequipmentBtn = new Button + { + Y=Application.GetRealHeight(16), + X = Application.GetRealWidth(5), + Width = Application.GetRealWidth(60), + Height = Application.GetRealWidth(60), + UnSelectedImagePath = "PirIcon/priequipment.png", + TextAlignment = TextAlignment.Center, + }; + devfLayout.AddChidren(priequipmentBtn); + //绾㈠瀹濆悕绉� + Button deviceNameBtn = new Button + { + Y=Application.GetRealHeight(16), + X = priequipmentBtn.Right + Application.GetRealWidth(7), + Width = Application.GetRealWidth(120), + Height = Application.GetRealHeight(20), + Text = "绾㈠瀹滱"+i.ToString(), + TextAlignment = TextAlignment.CenterLeft, + TextSize = TextSize.text14, + TextColor = CSS.CSS_Color.textColor, + IsBold = true, + }; + devfLayout.AddChidren(deviceNameBtn); + //鐗堟湰鍙� + Button versionBtn = new Button + { + Y = deviceNameBtn.Bottom+ Application.GetRealHeight(4), + X = priequipmentBtn.Right + Application.GetRealWidth(7), + Width = Application.GetRealWidth(120), + Height = Application.GetRealHeight(17), + Text = "鐗堟湰鍙穠1.3.5", + TextAlignment = TextAlignment.CenterLeft, + TextSize = TextSize.text12, + TextColor = CSS.CSS_Color.textCancelColor, + }; + devfLayout.AddChidren(versionBtn); + // 5/10 + Button geBtn = new Button + { + Y = versionBtn.Bottom + Application.GetRealHeight(2), + X = priequipmentBtn.Right + Application.GetRealWidth(7), + Width = Application.GetRealWidth(120), + Height = Application.GetRealHeight(17), + Text = "2", + TextAlignment = TextAlignment.CenterLeft, + TextSize = TextSize.text12, + TextColor = CSS.CSS_Color.textConfirmColor, + }; + devfLayout.AddChidren(geBtn); + geBtn.Width = geBtn.GetTextWidth(); + // 5/10 + Button sumBtn = new Button + { + Y = versionBtn.Bottom + Application.GetRealHeight(2), + X = geBtn.Right, + Width = Application.GetRealWidth(20), + Height = Application.GetRealHeight(17), + Text ="/10", + TextAlignment = TextAlignment.CenterLeft, + TextSize = TextSize.text12, + TextColor = CSS.CSS_Color.textCancelColor, + }; + devfLayout.AddChidren(sumBtn); + //鐘舵�佸浘鏍� + Button stateIconBtn = new Button + { + Y =Application.GetRealHeight(23), + X = Application.GetRealWidth(291), + Width = Application.GetRealWidth(8), + Height = Application.GetRealWidth(8), + UnSelectedImagePath = "PirIcon/online.png", + }; + devfLayout.AddChidren(stateIconBtn); + //绾㈠瀹濈姸鎬侊紙鍦ㄧ嚎-绂荤嚎锛� + Button stateTextBtn = new Button + { + Y = Application.GetRealHeight(18), + X = Application.GetRealWidth(303), + Width = Application.GetRealWidth(30), + Height = Application.GetRealHeight(17), + TextID=StringId.zaixianhwb, + TextAlignment = TextAlignment.CenterLeft, + TextSize = TextSize.text12, + TextColor = 0xFF67D569,// CSS.CSS_Color.textColor, + IsBold=true, + }; + devfLayout.AddChidren(stateTextBtn); + //绾� + Button lineBtn = new Button + { + Y = Application.GetRealHeight(92)-1, + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(343-16*2), + Height =1, + BackgroundColor = CSS.CSS_Color.viewLine, + }; + devfLayout.AddChidren(lineBtn); + + if (b - 1 == i) + { + //鏈�鍚庝竴涓悗闈㈠鍔犻棿闅旇儗鏅� + vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(20) }); + } + #endregion + + for (int j = 0; j < a; j++) { + RowLayout funControlRow = new RowLayout + { + Y = Application.GetRealHeight(92 + (50 * j)), + Width = Application.GetRealWidth(375 - 16 * 2), + Height = Application.GetRealHeight(50), + LineColor = CSS.CSS_Color.textWhiteColor, + SubViewWidth=Application.GetRealWidth(68), + }; + devfLayout.AddChidren(funControlRow); + //閬ユ帶鍣ㄥ悕绉� + Button nameBtn = new Button + { + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(150), + Height = Application.GetRealHeight(20), + Text =j.ToString(), + TextAlignment=TextAlignment.CenterLeft, + TextSize = TextSize.text14, + TextColor = CSS.CSS_Color.textColor, + Gravity=Gravity.CenterVertical, + }; + funControlRow.AddChidren(nameBtn); + //閬ユ帶鍣ㄥ尯鍩� + Button areaBtn = new Button + { + X=Application.GetRealWidth(311+16-(40+100)), + Width = Application.GetRealWidth(100), + Height = Application.GetRealHeight(17), + Text = j.ToString(), + TextAlignment = TextAlignment.CenterRight, + TextSize = TextSize.text12, + TextColor = CSS.CSS_Color.textCancelColor, + Gravity =Gravity.CenterVertical, + }; + funControlRow.AddChidren(areaBtn); + //涓嬩竴绾у浘鏍� + Button nextIconBtn = new Button + { + X = Application.GetRealWidth(295+16), + Width = Application.GetRealWidth(16), + Height = Application.GetRealWidth(16), + UnSelectedImagePath = "PirIcon/next.png", + Gravity = Gravity.CenterVertical, + }; + funControlRow.AddChidren(nextIconBtn); + //鍒犻櫎 + Button delBtn = new Button + { + Width = Application.GetRealWidth(50), + Height = Application.GetRealHeight(22), + TextID = StringId.Del, + TextAlignment = TextAlignment.Center, + TextSize = TextSize.text16, + TextColor = CSS.CSS_Color.textWhiteColor, + IsBold=true, + BackgroundColor= CSS.CSS_Color.textRedColor, + }; + funControlRow.AddRightView(delBtn); + //绾� + Button line1Btn = new Button + { + Y = Application.GetRealHeight(50 - 2), + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(311), + Height = 1, + BackgroundColor = CSS.CSS_Color.viewLine, + }; + funControlRow.AddChidren(line1Btn); + if (j == a - 1) + { + //鏈�鍚庢敼鍙樹竴涓嚎鐨勯鑹� + line1Btn.BackgroundColor = CSS.CSS_Color.viewTranslucence; + funControlRow.LineColor = CSS.CSS_Color.viewTranslucence; + } + delBtn.MouseUpEventHandler += (sender,e) => { + + + }; + } + + + + } + + } + } +} -- Gitblit v1.8.0