From 1c4904d77f484c075080942d87785481b52b6fb2 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期一, 28 十月 2019 14:58:46 +0800 Subject: [PATCH] Revert "Merge branch 'dev-tzy' into DEV_GXC" --- ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs | 165 +++++++++++-------------------------------------------- 1 files changed, 33 insertions(+), 132 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs index 4e81bfb..be6c3a1 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs @@ -17,6 +17,11 @@ /// <param name="common">Common.</param> public void Changed(CommonDevice common) { + //if (common.Type != ZigBee.Device.DeviceType.OnOffSwitch) + //{ + // return; + //} + Shared.Application.RunOnMainThread(() => { //var dev = common as Panel; @@ -52,44 +57,37 @@ { RemoveFromParent(); }; - this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 200 - 58); this.btnBack.MouseUpEventHandler += eHandlerBack; this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack; this.MidFrameLayout(this); var btnAddFrameLayout = new FrameLayout { - X = Application.GetRealWidth(830), - Width = Application.GetRealWidth(0),//200 - BackgroundColor = 0xff00ff00, + X = Application.GetRealWidth(953), + Height = Application.GetRealHeight(72), + Width = Application.GetRealWidth(72), }; this.titleFrameLayout.AddChidren(btnAddFrameLayout); var btnFloorText = new Button { - Width = Application.GetRealWidth(110), - X = Application.GetRealWidth(15), - Text = Language.StringByID(R.MyInternationalizationString.FirstFloor), + Height = Application.GetRealHeight(84), + Width = Application.GetRealWidth(58), + X = Application.GetRealWidth(881), + Text = "涓�妤�", TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, - TextSize = 15, - TextAlignment = TextAlignment.CenterRight, - BackgroundColor = 0xffff0000, }; btnAddFrameLayout.AddChidren(btnFloorText); var btnBindDown = new Button { - Height = Application.GetRealHeight(69), - Width = Application.GetRealWidth(69), - X = Application.GetRealWidth(200 - 69), - UnSelectedImagePath = "BindPic/BindDown.png", - Gravity = Gravity.CenterVertical, - BackgroundColor = 0xff0000ff, + Height = Application.GetRealHeight(72), + Width = Application.GetRealWidth(72), + //UnSelectedImagePath = "BindPic/BindDown.png", }; btnAddFrameLayout.AddChidren(btnBindDown); btnBindDown.MouseDownEventHandler += (sender, e) => { - SideslipFramelayout(); }; MidFrameLayoutContent(); } @@ -107,6 +105,14 @@ { }; btnMidTopLayout.AddChidren(btnHorizontalScrolViewLayout); + + //var btnLine = new Button + //{ + // Y = btnMidTopLayout.Bottom, + // Height = 1, + // BackgroundColor = Shared.Common.ZigbeeColor.Current.XMTitleLine, + //}; + //this.midFrameLayout.AddChidren(btnLine); midVerticalScrolViewLayout = new VerticalScrolViewLayout() { @@ -314,7 +320,11 @@ #endregion } - // 鎸夐敭缁戝畾鍦烘櫙琛ㄦ樉绀� + /// <summary> + /// 鎸夐敭缁戝畾鍦烘櫙琛ㄦ樉绀� + /// </summary> + /// <param name="gateway">Gateway.</param> + /// <param name="key">Key.</param> void RefreshRoomList(Shared.Common.Room curRoom, Button btnFinish, ref int index2) { Button curentOldRoom = null; @@ -323,11 +333,6 @@ for (int i = 0; i < roomList.Count; i++) { var room = roomList[i]; - if (room.IsLove == true) - { - //; - } - var btnRoomFrameLayout = new FrameLayout { Height = Application.GetRealHeight(78), @@ -350,8 +355,6 @@ TextSize = 12, TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, Gravity = Gravity.Center, - //SelectedImagePath = "BindPic/BindRoomColorOn.png", - //UnSelectedImagePath = "BindPic/BindRoomColor.png", }; btnRoomFrameLayout.AddChidren(btnRoom); @@ -370,7 +373,6 @@ else { btnRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3; - btnRoom.IsSelected = false; btnRoomFrameLayout.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout; btnRoomFrameLayout.BorderWidth = 1; } @@ -460,7 +462,11 @@ } } - //鎸夐敭缁戝畾鍦烘櫙琛ㄦ樉绀� + /// <summary> + /// 鎸夐敭缁戝畾鍦烘櫙琛ㄦ樉绀� + /// </summary> + /// <param name="gateway">Gateway.</param> + /// <param name="key">Key.</param> void RefreshSceneList(Shared.Common.Room curRoom) { midVerticalScrolViewLayout.RemoveAll(); @@ -582,111 +588,6 @@ btnBindName.MouseUpEventHandler += hander; btnChoose.MouseUpEventHandler += hander; curIndex++; - } - } - - // 渚ц竟瀵艰埅鏍� - void SideslipFramelayout() - { - var dialog = new Dialog - { - }; - dialog.Show(); - - var flMain = new FrameLayout { BackgroundColor = 0x00000000 }; - dialog.AddChidren(flMain); - flMain.MouseUpEventHandler += (sender11, e11) => - { - dialog.Close(); - }; - - var sidelipFrameLayout = new FrameLayout() - { - Height = Application.GetRealHeight(783), - Width = Application.GetRealWidth(449), - Y = Application.GetRealHeight(161), - X = Application.GetRealWidth(596), - BackgroundImagePath = "DoorLock/SideslipPic.png", - }; - flMain.AddChidren(sidelipFrameLayout); - - var btnSelectFloor = new Button() - { - Width = Application.GetRealWidth(200), - Height = Application.GetRealHeight(58), - X = Application.GetRealWidth(81), - Y = Application.GetRealHeight(58), - TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, - TextSize = 14, - TextAlignment = TextAlignment.CenterLeft, - TextID = R.MyInternationalizationString.SelectFloor, - }; - sidelipFrameLayout.AddChidren(btnSelectFloor); - - var sidelipVerticalScrolViewLayout = new VerticalScrolViewLayout() - { - Height = Application.GetRealHeight(600), - Y = Application.GetRealHeight(173), - }; - sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout); - - //鑾峰彇妤煎眰 - var dicFloor = Common.Room.CurrentRoom.GetFloorSortList(); - - Button oldbutton = null; - Button oldbuttonText = null; - foreach (var floorId in dicFloor.Keys) - { - var rowFrameLayout = new RowLayout() - { - Height = Application.GetRealHeight(150), - }; - sidelipVerticalScrolViewLayout.AddChidren(rowFrameLayout); - - var btnAllMethod = new Button() - { - Width = Application.GetRealWidth(81), - Height = Application.GetRealHeight(81), - X = Application.GetRealWidth(81), - Y = Application.GetRealHeight(55), - }; - rowFrameLayout.AddChidren(btnAllMethod); - - var btnMethodText = new Button() - { - Width = Application.GetRealWidth(311), - Height = Application.GetRealHeight(58), - X = Application.GetRealWidth(173), - Y = Application.GetRealHeight(69), - TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, - TextSize = 14, - TextAlignment = TextAlignment.CenterLeft, - Text = dicFloor[floorId], - }; - rowFrameLayout.AddChidren(btnMethodText); - - EventHandler<MouseEventArgs> hander = (sender, e) => - { - if (!btnMethodText.IsSelected) - { - if (oldbutton != null) - { - oldbutton.IsSelected = false; - } - if (oldbuttonText != null) - { - oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3; - } - oldbutton = btnMethodText; - oldbuttonText = btnMethodText; - btnMethodText.IsSelected = true; - oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; - } - dialog.Close(); - }; - btnAllMethod.MouseUpEventHandler += hander; - rowFrameLayout.MouseUpEventHandler += hander; - btnMethodText.MouseUpEventHandler += hander; } } -- Gitblit v1.8.0