From 00ab3ddb140ba8bb88b5cf572b004a85e1da85e9 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期四, 02 一月 2020 19:51:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into DEV_GXC

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/ACZbGatewayUpdateMenuForm.cs |  101 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 101 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/ACZbGatewayUpdateMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/ACZbGatewayUpdateMenuForm.cs
new file mode 100755
index 0000000..716466e
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/ACZbGatewayUpdateMenuForm.cs
@@ -0,0 +1,101 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using ZigBee.Device;
+
+namespace Shared.Phone.UserCenter.DeviceAirConditioner
+{
+    /// <summary>
+    /// 涓ぎ绌鸿皟鐨勫崌绾ц彍鍗曠晫闈�
+    /// </summary>
+    public class ACZbGatewayUpdateMenuForm : EditorCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 璁惧
+        /// </summary>
+        private AC deviceAc = null;
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        /// <param name="i_deviceAc">璁惧</param>
+        /// <param name="hadNewVersion">鎷ユ湁鏂扮増鏈�</param>
+        public void ShowForm(AC i_deviceAc, bool hadNewVersion)
+        {
+            this.deviceAc = i_deviceAc;
+
+            //璁剧疆澶撮儴淇℃伅
+            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uFirmwareUpdate));
+
+            //鍒濆鍖栦腑閮ㄤ俊鎭�
+            this.InitMiddleFrame(hadNewVersion);
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+        /// </summary>
+        private void InitMiddleFrame(bool hadNewVersion)
+        {
+            //娓呯┖bodyFrame
+            this.ClearBodyFrame();
+
+            var frameBack = new FrameLayout();
+            frameBack.Height = Application.GetRealHeight(8);
+            frameBack.BackgroundColor = UserCenterColor.Current.White;
+            bodyFrameLayout.AddChidren(frameBack);
+
+            var listView = new VerticalListControl(12);
+            listView.Y = frameBack.Bottom;
+            listView.Height = bodyFrameLayout.Height;
+            listView.BackgroundColor = UserCenterColor.Current.White;
+            bodyFrameLayout.AddChidren(listView);
+
+            var btnNewVersion = new PicViewControl(78, 55);
+            //閫氫俊鑺墖
+            var rowComunication = new FrameRowControl(listView.rowSpace / 2);
+            listView.AddChidren(rowComunication);
+            rowComunication.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uCommunicationChip), 600);
+            rowComunication.AddRightArrow();
+            rowComunication.AddBottomLine();
+            rowComunication.ButtonClickEvent += (sender, e) =>
+            {
+                //杩欓噷鏄澶囩殑Ota鍗囩骇
+                btnNewVersion.Visible = false;
+                var form = new Device.DeviceFirmwareUpdateForm();
+                form.AddForm(this.deviceAc.DeviceAddr);
+            };
+            //鎻愮ず鏈夋柊鐗堟湰
+            btnNewVersion.UnSelectedImagePath = "Item/NewVersion.png";
+            btnNewVersion.Visible = hadNewVersion;
+            btnNewVersion.X = Application.GetRealWidth(242);
+            btnNewVersion.Y = Application.GetRealHeight(23);
+            rowComunication.AddChidren(btnNewVersion, ChidrenBindMode.BindEventOnly);
+
+            //绌鸿皟妯″潡
+            var rowModel = new FrameRowControl(listView.rowSpace / 2);
+            listView.AddChidren(rowModel);
+            rowModel.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uAirConditioningModule), 600);
+            rowModel.AddRightArrow();
+            rowModel.ButtonClickEvent += (sender, e) =>
+            {
+                var form = new ACZbGatewayModuleUpdateForm();
+                form.AddForm(deviceAc);
+            };
+
+            //璋冩暣鍒楄〃楂樺害
+            listView.AdjustRealHeight(Application.GetRealHeight(23));
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        #endregion
+    }
+}

--
Gitblit v1.8.0