From f71e74b5f0d2716fbf05da016cdaa18d64e09f80 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期四, 31 十二月 2020 17:01:18 +0800 Subject: [PATCH] 又换完成最新门锁。空气质量传感器完成数据和基本配置功能。开发图表和自动化的同事可下载此代码 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorlockDialog.cs | 350 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 175 insertions(+), 175 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorlockDialog.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorlockDialog.cs old mode 100755 new mode 100644 index 228c616..eedc62b --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorlockDialog.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorlockDialog.cs @@ -3,181 +3,181 @@ namespace Shared.Phone.UserCenter.DoorLock { - public class DoorlockDialog : FrameLayout + public class DoorlockDialog : FrameLayout + { + /// <summary> + /// 闂ㄩ攣寮圭獥 + /// </summary> + /// <param name="dialog"></param> + /// <param name="title"></param> + public DoorlockDialog(Dialog dialog, string title) { - /// <summary> - /// 闂ㄩ攣寮圭獥 - /// </summary> - /// <param name="dialog"></param> - /// <param name="title"></param> - public DoorlockDialog(Dialog dialog, string title) - { - this.dialog = dialog; - this.title = title; - } - /// <summary> - /// 寮圭獥鏍囬 - /// </summary> - public string title = string.Empty; - public Dialog dialog; - - /// <summary> - /// 寮圭獥鏍囬鏍忎笅鐨勭嚎鏉� - /// </summary> - public Button dialogLine = new Button - { - Height = 1, - Y = Application.GetRealHeight(380), - BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine, - }; - - /// <summary> - /// 寮圭獥鍙栨秷鎸夐敭 - /// </summary> - public Button dialogBtnCancel = new Button - { - TextID = R.MyInternationalizationString.Cancel, - TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, - TextSize = 14, - }; - - /// <summary> - /// 寮圭獥纭鎸夐敭 - /// </summary> - public Button dialogBtnConfirm = new Button - { - TextID = R.MyInternationalizationString.confrim, - TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, - TextSize = 14, - }; - - /// <summary> - /// 寮圭獥涓儴甯冨眬 - /// </summary> - public FrameLayout dialogMidFraFrameLayout = new FrameLayout - { - Height = Application.GetRealHeight(58), - X = Application.GetRealWidth(190), - Y = Application.GetRealHeight(202), - }; - - /// <summary> - /// 寮圭獥涓儴鏂囨湰 - /// </summary> - public Button dialogMidText = new Button - { - TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, - TextSize = 14, - TextAlignment = TextAlignment.Center, - }; - - /// <summary> - /// 寮圭獥闃村奖鑳屾櫙 - /// </summary> - public FrameLayout flMain = new FrameLayout - { - BackgroundColor = 0x00000000, - }; - - /// <summary> - /// 寮圭獥鏄剧ず - /// </summary> - public void Show() - { - dialog.Show(); - dialog.AddChidren(flMain); - flMain.MouseUpEventHandler += (sender11, e11) => - { - dialog.Close(); - }; - - var dialogFrameLayout = new FrameLayout() - { - Height = Application.GetRealHeight(380 + 127), - Width = Application.GetRealWidth(792), - Y = Application.GetRealHeight(691 - 184), - X = Application.GetRealWidth(144), - BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite, - Radius = 6, - }; - flMain.AddChidren(dialogFrameLayout); - - var dialogTitle = new Button() - { - Width = Application.GetRealWidth(492), - Height = Application.GetRealHeight(63), - X = Application.GetRealWidth(150), - Y = Application.GetRealHeight(69), - Text = title, - TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, - TextSize = 16, - }; - #region 搴曢儴鍦嗚UI - var rFrameLayout0 = new FrameLayout - { - Width = Application.GetRealWidth(397), - Height = Application.GetRealHeight(50), - Y = Application.GetRealHeight(380) + 1, - BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout, - }; - - var rFrameLayout1 = new FrameLayout - { - Width = Application.GetRealWidth(398), - Height = Application.GetRealHeight(50), - X = Application.GetRealWidth(397), - Y = Application.GetRealHeight(380) + 1, - BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, - }; - - var rFrameLayout2 = new FrameLayout - { - Width = Application.GetRealWidth(50), - Height = Application.GetRealHeight(128) - 1, - X = Application.GetRealWidth(397 - 50), - Y = Application.GetRealHeight(380) + 1, - BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout, - }; - - var rFrameLayout3 = new FrameLayout - { - Width = Application.GetRealWidth(50), - Height = Application.GetRealHeight(128) - 1, - X = Application.GetRealWidth(397), - Y = Application.GetRealHeight(380) + 1, - BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, - }; - - var r1FrameLayout = new FrameLayout - { - Width = Application.GetRealWidth(397), - Height = Application.GetRealHeight(128) - 1, - Y = Application.GetRealHeight(380) + 1, - BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout, - Radius = 6, - }; - - var r2FrameLayout = new FrameLayout - { - Width = Application.GetRealWidth(398), - Height = Application.GetRealHeight(128) - 1, - X = Application.GetRealWidth(397), - Y = Application.GetRealHeight(380) + 1, - BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, - Radius = 6, - }; - dialogFrameLayout.AddChidren(rFrameLayout0); - dialogFrameLayout.AddChidren(rFrameLayout1); - dialogFrameLayout.AddChidren(rFrameLayout2); - dialogFrameLayout.AddChidren(rFrameLayout3); - dialogFrameLayout.AddChidren(r1FrameLayout); - dialogFrameLayout.AddChidren(r2FrameLayout); - #endregion - dialogFrameLayout.AddChidren(dialogTitle); - dialogFrameLayout.AddChidren(dialogMidFraFrameLayout); - dialogFrameLayout.AddChidren(dialogLine); - r2FrameLayout.AddChidren(dialogBtnConfirm); - r1FrameLayout.AddChidren(dialogBtnCancel); - } + this.dialog = dialog; + this.title = title; } + /// <summary> + /// 寮圭獥鏍囬 + /// </summary> + public string title = string.Empty; + public Dialog dialog; + + /// <summary> + /// 寮圭獥鏍囬鏍忎笅鐨勭嚎鏉� + /// </summary> + public Button dialogLine = new Button + { + Height = 1, + Y = Application.GetRealHeight(380), + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine, + }; + + /// <summary> + /// 寮圭獥鍙栨秷鎸夐敭 + /// </summary> + public Button dialogBtnCancel = new Button + { + TextID = R.MyInternationalizationString.Cancel, + TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + TextSize = 14, + }; + + /// <summary> + /// 寮圭獥纭鎸夐敭 + /// </summary> + public Button dialogBtnConfirm = new Button + { + TextID = R.MyInternationalizationString.confrim, + TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, + TextSize = 14, + }; + + /// <summary> + /// 寮圭獥涓儴甯冨眬 + /// </summary> + public FrameLayout dialogMidFraFrameLayout = new FrameLayout + { + Height = Application.GetRealHeight(58), + X = Application.GetRealWidth(190), + Y = Application.GetRealHeight(202), + }; + + /// <summary> + /// 寮圭獥涓儴鏂囨湰 + /// </summary> + public Button dialogMidText = new Button + { + TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + TextSize = 14, + TextAlignment = TextAlignment.Center, + }; + + /// <summary> + /// 寮圭獥闃村奖鑳屾櫙 + /// </summary> + public FrameLayout flMain = new FrameLayout + { + BackgroundColor = 0x00000000, + }; + + /// <summary> + /// 寮圭獥鏄剧ず + /// </summary> + public void Show() + { + dialog.Show(); + dialog.AddChidren(flMain); + flMain.MouseUpEventHandler += (sender11, e11) => + { + dialog.Close(); + }; + + var dialogFrameLayout = new FrameLayout() + { + Height = Application.GetRealHeight(380 + 127), + Width = Application.GetRealWidth(792), + Y = Application.GetRealHeight(691 - 184), + X = Application.GetRealWidth(144), + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite, + Radius = (uint)Application.GetRealHeight(17), + }; + flMain.AddChidren(dialogFrameLayout); + + var dialogTitle = new Button() + { + Width = Application.GetRealWidth(492), + Height = Application.GetRealHeight(63), + X = Application.GetRealWidth(150), + Y = Application.GetRealHeight(69), + Text = title, + TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, + TextSize = 16, + }; + #region 搴曢儴鍦嗚UI + var rFrameLayout0 = new FrameLayout + { + Width = Application.GetRealWidth(397), + Height = Application.GetRealHeight(50), + Y = Application.GetRealHeight(380) + 1, + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout, + }; + + var rFrameLayout1 = new FrameLayout + { + Width = Application.GetRealWidth(398), + Height = Application.GetRealHeight(50), + X = Application.GetRealWidth(397), + Y = Application.GetRealHeight(380) + 1, + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, + }; + + var rFrameLayout2 = new FrameLayout + { + Width = Application.GetRealWidth(50), + Height = Application.GetRealHeight(128) - 1, + X = Application.GetRealWidth(397 - 50), + Y = Application.GetRealHeight(380) + 1, + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout, + }; + + var rFrameLayout3 = new FrameLayout + { + Width = Application.GetRealWidth(50), + Height = Application.GetRealHeight(128) - 1, + X = Application.GetRealWidth(397), + Y = Application.GetRealHeight(380) + 1, + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, + }; + + var r1FrameLayout = new FrameLayout + { + Width = Application.GetRealWidth(397), + Height = Application.GetRealHeight(128) - 1, + Y = Application.GetRealHeight(380) + 1, + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout, + Radius = (uint)Application.GetRealHeight(17), + }; + + var r2FrameLayout = new FrameLayout + { + Width = Application.GetRealWidth(398), + Height = Application.GetRealHeight(128) - 1, + X = Application.GetRealWidth(397), + Y = Application.GetRealHeight(380) + 1, + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, + Radius = (uint)Application.GetRealHeight(17), + }; + dialogFrameLayout.AddChidren(rFrameLayout0); + dialogFrameLayout.AddChidren(rFrameLayout1); + dialogFrameLayout.AddChidren(rFrameLayout2); + dialogFrameLayout.AddChidren(rFrameLayout3); + dialogFrameLayout.AddChidren(r1FrameLayout); + dialogFrameLayout.AddChidren(r2FrameLayout); + #endregion + dialogFrameLayout.AddChidren(dialogTitle); + dialogFrameLayout.AddChidren(dialogMidFraFrameLayout); + dialogFrameLayout.AddChidren(dialogLine); + r2FrameLayout.AddChidren(dialogBtnConfirm); + r1FrameLayout.AddChidren(dialogBtnCancel); + } + } } -- Gitblit v1.8.0