From 94bed925cf453e148bc5a7556a8a86e0bcb9ad6c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 24 三月 2021 14:11:16 +0800
Subject: [PATCH] Merge branch 'WJC' into temp-wxr

---
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs       |   22 +++++++++--
 HDL-ON_iOS/Resources/Language.ini                        |    4 +
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs    |    6 +-
 HDL-ON_Android/Assets/Language.ini                       |    6 ++
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs      |   15 +++++--
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/PirView.cs |   21 +---------
 HDL_ON/Common/R.cs                                       |    2 +
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs      |    2 
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/Buttons.cs |    2 
 HDL-ON_Android/Application.cs                            |   10 +++-
 HDL-ON_Android/Other/JPush/JPushReceiver.cs              |    5 --
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs       |   11 +++--
 12 files changed, 60 insertions(+), 46 deletions(-)

diff --git a/HDL-ON_Android/Application.cs b/HDL-ON_Android/Application.cs
index 4f9f009..bb0bab8 100644
--- a/HDL-ON_Android/Application.cs
+++ b/HDL-ON_Android/Application.cs
@@ -28,7 +28,7 @@
             application.StartActivity(intent);
             Android.OS.Process.KillProcess(Android.OS.Process.MyPid());
         }
-        
+
         public Application(IntPtr handle, Android.Runtime.JniHandleOwnership ownerShip) : base(handle, ownerShip) { }
         public override void OnCreate()
         {
@@ -46,6 +46,8 @@
             initAll();
 
         }
+
+
 
         /// <summary>
         /// 鎵�鏈夊垵濮嬪寲鍏ㄩ儴鍦ㄨ繖涓柟娉曞疄鐜�
@@ -135,6 +137,7 @@
             {
                 checkSomeInfo();
 
+
             };
             BaseActivity.OnDestroyAction += (activity) =>
             {
@@ -174,9 +177,10 @@
         /// <param name="activity"></param>
         void GetJPushRegistrationID(BaseActivity activity)
         {
-          
+
             try
             {
+
                 //淇濆瓨鑾峰彇鐨勬瀬鍏夋湇鍔″櫒涓婄殑娉ㄥ唽ID鍒版湰鍦版枃浠�
                 var tokenID = JPushInterface.GetRegistrationID(activity);
                 Console.WriteLine("RegistrationID:  " + tokenID);
@@ -366,7 +370,7 @@
             //杩涘叆鍚庡彴mqtt姝e湪杩炴帴閲嶇疆鐘舵��
             HDL_ON.DAL.Mqtt.MqttClient.RemoteMqttIsConnecting = false;
             HDL_ON.DriverLayer.UdpSocket._BusSocket.Stop();
-           
+
         }
 
         /// <summary>
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index d1df129..6539302 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1387,10 +1387,14 @@
 6071=淇敼鍚嶅瓧
 6072=纭鍒犻櫎
 6073=鍙栨秷
-6074=閬ユ帶鍣ㄤ笉鑳借秴杩�10涓紵
+6074=閬ユ帶鍣ㄤ笉鑳借秴杩�10涓�
 6075=閬ユ帶鍣ㄦ墍灞炲尯鍩�:
 6076=缂栬緫淇℃伅
 6077=鐗堟湰鍗囩骇
+6078=绯荤粺缁存姢涓瓇璇风◢鍚庡啀璇晘
+6079=鑾峰彇鏁版嵁澶辫触
+
+
 
 
 6015=鍦ㄧ嚎
diff --git a/HDL-ON_Android/Other/JPush/JPushReceiver.cs b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
index ff8a03b..48ee1fc 100644
--- a/HDL-ON_Android/Other/JPush/JPushReceiver.cs
+++ b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -98,7 +98,6 @@
         public override void OnRegister(Context context, string p1)
         {
             base.OnRegister(context, p1);
-
             Utlis.WriteLine("JPushOnRegister: " + p1);
         }
 
@@ -112,8 +111,6 @@
         //{
         //    try
         //    {
-               
-
         //        if (JPushMessageInfo.Extras.Contains("Offline") == true)
         //        {
         //            Shared.Application.RunOnMainThread(() =>
@@ -141,7 +138,7 @@
         //}
 
         /// <summary>
-        /// 鎵撳紑娑堟伅鏄剧ず鐣岄潰
+        /// 鎵撳紑娑堟伅鏄剧ず鐣岄潰.010000
         /// </summary>
         /// <param name="context"></param>
         /// <param name="notificationMessage"></param>
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index ae19318..930ba63 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1387,10 +1387,12 @@
 6071=淇敼鍚嶅瓧
 6072=纭鍒犻櫎
 6073=鍙栨秷
-6074=閬ユ帶鍣ㄤ笉鑳借秴杩�10涓紵
+6074=閬ユ帶鍣ㄤ笉鑳借秴杩�10涓�
 6075=閬ユ帶鍣ㄦ墍灞炲尯鍩�:
 6076=缂栬緫淇℃伅
 6077=鐗堟湰鍗囩骇
+6078=绯荤粺缁存姢涓瓇璇风◢鍚庡啀璇晘
+6079=鑾峰彇鏁版嵁澶辫触
 
 6015=鍦ㄧ嚎
 6016=绂荤嚎
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 7ae6f60..65f372e 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -868,6 +868,8 @@
         public const int yaokongqiquyu = 6075;
         public const int bianjixinxi = 6076;
         public const int banbenshengji = 6077;
+        public const int xitongweihuzhong = 6078;
+        public const int huoqushujushibao = 6079;
 
 
 
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs
index f32175c..cfacb7f 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs
@@ -12,6 +12,7 @@
         }
         public void Show(Control control)
         {
+           
             #region 鐣岄潰甯冨眬
             this.BackgroundColor = CSS.CSS_Color.viewMiddle;
             PirDevice.View.TopView topView = new View.TopView();
@@ -122,10 +123,7 @@
                 }
                 //new寮曞鐣岄潰
                 View.ReplicationView replication = new View.ReplicationView();
-               // MainPage.BasePageView.AddChidren(replication);
                 replication.Show(this);
-               // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-
 
                 //娣诲姞鏁版嵁瀵硅薄
                 Entity.AttributesStatus buttonObj = new Entity.AttributesStatus();
@@ -191,5 +189,7 @@
             };
 
         }
+
+      
     }
 }
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs
index e65cb76..9236d52 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs
@@ -8,6 +8,7 @@
 {
     public class Method
     {
+       
         /// <summary>
         /// 绾㈠瀹濈▼搴忎富鍏ュ彛
         /// </summary>
@@ -15,7 +16,6 @@
         /// <param name="function"></param>
         public void MainView(FrameLayout frame, Entity.Function function,Action action)
         {
-
             Pir pirDevice = new Pir();
             if (function != null)
             {//鏁版嵁杞崲
@@ -23,6 +23,7 @@
                 pirDevice.deviceId = function.deviceId;
                 pirDevice.sid = function.sid;
                 pirDevice.online = function.online;
+                pirDevice.versions = function.versions;
             }
             Pir.currPir = pirDevice;
             GetControlList(frame, () =>
@@ -501,7 +502,7 @@
             }
             else if (text == "璇诲彇绾㈠瀹濆垪琛ㄥけ璐�")
             {
-                str = "璇诲彇绾㈠瀹濆垪琛ㄥけ璐�"; //Language.StringByID(StringId.delFail);
+                str = Language.StringByID(StringId.huoqushujushibao);
             }
             else
             {
@@ -519,19 +520,19 @@
                             break;
                         case "10807":
                             {
-                                str = "绾㈠瀹濅笅閬ユ帶鍣ㄨ秴杩囨渶澶�(10涓�)鏁伴噺闄愬埗";// Language.StringByID(StringId.gatewayNotOnline);
+                                str = Language.StringByID(StringId.bunengchaoguo10);
 
 
                             }
                             break;
                         case "2":
                             {
-                                str = "绯荤粺缁存姢涓瓇璇风◢鍚庡啀璇晘";
+                                str = Language.StringByID(StringId.xitongweihuzhong);
                             }
                             break;
                         default:
                             {
-                                str ="鑾峰彇鏁版嵁澶辫触" ;// Language.StringByID(StringId.saveFail);
+                                str = Language.StringByID(StringId.huoqushujushibao);
                             }
                             break;
 
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
index 0be0bba..c1169c5 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -32,9 +32,8 @@
             this.AddChidren(topView.FLayoutView());
             topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
             {
-                BackAction();
-                BackAction = null;
-                this.RemoveFromParent();
+               
+                RemoveFromParent();
             };
 
             FrameLayout middFLayout = new FrameLayout();
@@ -519,7 +518,15 @@
                 }
             }, id, "鍝佺墝鍒楄〃");
         }
-
+        /// <summary>
+        /// 绉婚櫎鐣岄潰
+        /// </summary>
+        public override void RemoveFromParent()
+        {
+            BackAction();
+            BackAction = null;
+            base.RemoveFromParent();
+        }
 
     }
 
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
index 44023c0..2529c83 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
@@ -150,7 +150,7 @@
         /// 绾㈠鐮佸涔�
         /// </summary>
         /// <returns></returns>
-        public static void CodeStudy(string deviceId,AttributesStatus buttonObj,Action<ResponsePackNew> action)
+        public static void CodeStudy(string deviceId, AttributesStatus buttonObj,Action<ResponsePackNew> action)
         {
             var job = new JObject { };
             job.Add("key", buttonObj.key);
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
index 95a465b..40ae860 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
@@ -12,16 +12,17 @@
         {
             Tag = "PirMain";
         }
-
+        Action backAction;
         public void Show(Action action)
         {
+            backAction = action;
             #region 鐣岄潰甯冨眬
             this.BackgroundColor = CSS.CSS_Color.viewMiddle;
             Intelligence.Automation.LogicView.TopView topView = new Intelligence.Automation.LogicView.TopView();
             this.AddChidren(topView.FLayoutView());
             topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
             {
-                action();
+                //action();
                 RemoveFromParent();
             };
             topView.topNameBtn.TextID = StringId.setlogic;
@@ -46,10 +47,16 @@
             banbenshengjiFL.btnText.Text = Language.StringByID(StringId.banbenshengji);
             banbenshengjiFL.frameLayout.Y = editNameFLayout.frameLayout.Bottom;
             viewLayout.AddChidren(banbenshengjiFL.FLayoutView());
+
+            var versions = Pir.currPir.versions.Find((c)=>c.module== "fw_version");
+            if (versions == null)
+            {
+                versions = new Entity.VersionInfo();
+            }
             ///鐗堟湰鍙�:v1.3.5
             FrameLayout50 banbenhaoFLayout = new FrameLayout50();
             banbenhaoFLayout.btnNextIcon.Visible = false;
-            banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":v1.3.5";
+            banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":"+ versions.version;
             banbenhaoFLayout.frameLayout.Y = banbenshengjiFL.frameLayout.Bottom;
             viewLayout.AddChidren(banbenhaoFLayout.FLayoutView());
             //鍒犻櫎
@@ -129,6 +136,13 @@
             #endregion
 
         }
-
+        /// <summary>
+        /// 绉婚櫎鐣岄潰
+        /// </summary>
+        public override void RemoveFromParent()
+        {
+            backAction();
+            base.RemoveFromParent();
+        }
     }
 }
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/Buttons.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/Buttons.cs
index db38adc..fe2767c 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/Buttons.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/Buttons.cs
@@ -13,7 +13,7 @@
         /// <param name="buttonList">鏁版嵁鍒楄〃</param>
         /// <param name="action">鍥炶皟</param>
         /// <param name="line">琛ㄧず澶氬皯琛�</param>
-        /// <param name="line">琛ㄧず涓�琛屽姞杞藉灏戜釜鎸夐挳</param>
+        /// <param name="sum">琛ㄧず涓�琛屽姞杞藉灏戜釜鎸夐挳</param>
         public void AddButton(FrameLayout buttonFLayout, List<string> buttonList, Action<string> action, int line = 7, int sum = 3)
         {
             VerticalScrolViewLayout vv = new VerticalScrolViewLayout();
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/PirView.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/PirView.cs
index 27d39e7..1567c59 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/PirView.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/PirView.cs
@@ -47,28 +47,12 @@
             IsBold = true,
         };
 
-
-        /// <summary>
-        /// 鐗堟湰鍙�
-        /// </summary>
-        public Button versionBtn = new Button
-        {
-            Y = Application.GetRealHeight(40),
-            X = Application.GetRealWidth(72),
-            Width = Application.GetRealWidth(120),
-            Height = Application.GetRealHeight(17),
-            Text = "鐗堟湰鍙穠1.3.5",
-            TextAlignment = TextAlignment.CenterLeft,
-            TextSize = TextSize.text12,
-            TextColor = CSS.CSS_Color.textCancelColor,
-        };
-
         /// <summary>
         /// 褰撳墠涓暟
         /// </summary>
         public Button geBtn = new Button
         {
-            Y = Application.GetRealHeight(59),
+            Y = Application.GetRealHeight(40),
             X = Application.GetRealWidth(72),
             Width = Application.GetRealWidth(120),
             Height = Application.GetRealHeight(17),
@@ -83,7 +67,7 @@
         /// </summary>
         public Button sumBtn = new Button
         {
-            Y = Application.GetRealHeight(59),
+            Y = Application.GetRealHeight(40),
             Width = Application.GetRealWidth(50),
             Height = Application.GetRealHeight(17),
             Text = "/10",
@@ -159,7 +143,6 @@
             devfLayout.Height = Application.GetRealHeight(92 + (50 * i));
             devfLayout.AddChidren(priequipmentBtn);
             devfLayout.AddChidren(deviceNameBtn);
-            devfLayout.AddChidren(versionBtn);
             devfLayout.AddChidren(geBtn);
             geBtn.Width = geBtn.GetTextWidth();
             devfLayout.AddChidren(sumBtn);

--
Gitblit v1.8.0