From 1d4908c193ffbc8c351fadcd1e8d9ba12af835d2 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 15 十二月 2020 14:17:28 +0800
Subject: [PATCH] 2020-12-15 1.客服反馈问题修改。2.翻译字段纠正。3.修改备注增加判空处理

---
 Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs |    4 +-
 Crabtree/ON/Assets/Language.ini                                        |   12 +++---
 Crabtree/ON.Ios/Info.plist                                             |    4 +-
 Crabtree/ON.Ios/Resources/Language.ini                                 |   12 +++---
 Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs     |    8 ++--
 Crabtree/SmartHome/UI/SimpleControl/Phone/Room/GenericDialog.cs        |   13 +++++-
 Crabtree/ON/Properties/AndroidManifest.xml                             |    2 
 Crabtree/.vs/SmartHome/xs/UserPrefs.xml                                |   30 +++++----------
 Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs      |    4 +-
 Crabtree/SmartHome/HDL/Operation/ResponseEntity/ErrorCode.cs           |   15 +++++++
 Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs   |   14 +++++--
 Crabtree/SmartHome/UI/SimpleControl/MainPage.cs                        |    2 
 12 files changed, 68 insertions(+), 52 deletions(-)

diff --git a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
index 442d299..5b9d967 100644
--- a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
+++ b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
@@ -1,27 +1,15 @@
-锘�<Properties StartupConfiguration="{1D83BF28-BA88-4152-BA41-D7EFE90A5437}|Default">
-  <MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.Android_Accelerated_Oreo" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="ON/Properties/AndroidManifest.xml">
-    <Files>
-      <File FileName="SmartHome/UI/SimpleControl/MainPage.cs" Line="1" Column="1" />
-      <File FileName="ON.Ios/Info.plist" />
-      <File FileName="SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs" Line="118" Column="45" />
-      <File FileName="SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs" Line="1" Column="1" />
-      <File FileName="SmartHome/UI/SimpleControl/Phone/Register/AccountView.cs" Line="206" Column="19" />
-      <File FileName="ON/Properties/AndroidManifest.xml" />
-    </Files>
+锘�<Properties StartupConfiguration="{9D9EF20B-6E65-4A65-92BF-567EBF1E1443}|Default">
+  <MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.364c4b3158493098" />
+  <MonoDevelop.Ide.Workbench>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="SmartHome" expanded="True">
-            <Node name="ON.Droid" expanded="True" selected="True">
-              <Node name="Properties" expanded="True" />
-            </Node>
+            <Node name="ON.Ios" expanded="True" selected="True" />
             <Node name="Shared" expanded="True">
-              <Node name="UI" expanded="True">
-                <Node name="SimpleControl" expanded="True">
-                  <Node name="Phone" expanded="True">
-                    <Node name="Register" expanded="True" />
-                  </Node>
+              <Node name="HDL" expanded="True">
+                <Node name="Operation" expanded="True">
+                  <Node name="ResponseEntity" expanded="True" />
                 </Node>
               </Node>
             </Node>
@@ -40,7 +28,9 @@
   <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
   <MonoDevelop.Ide.ItemProperties.ON.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" />
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
-    <BreakpointStore />
+    <BreakpointStore>
+      <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/CrabtreeOn/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs" relfile="SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs" line="477" column="11" />
+    </BreakpointStore>
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
   <MultiItemStartupConfigurations />
 </Properties>
\ No newline at end of file
diff --git a/Crabtree/ON.Ios/Info.plist b/Crabtree/ON.Ios/Info.plist
index 70e85d6..e461fe7 100755
--- a/Crabtree/ON.Ios/Info.plist
+++ b/Crabtree/ON.Ios/Info.plist
@@ -17,9 +17,9 @@
 	<key>CFBundleIdentifier</key>
 	<string>com.hdl.on</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.512081</string>
+	<string>2.512151</string>
 	<key>CFBundleVersion</key>
-	<string>2.512081</string>
+	<string>2.512151</string>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<key>MinimumOSVersion</key>
diff --git a/Crabtree/ON.Ios/Resources/Language.ini b/Crabtree/ON.Ios/Resources/Language.ini
index d5de5c0..9394883 100644
--- a/Crabtree/ON.Ios/Resources/Language.ini
+++ b/Crabtree/ON.Ios/Resources/Language.ini
@@ -302,7 +302,7 @@
 306=Theme
 307=Theme changed successfully. Please restart the application.
 308=Restore default skin
-309=Favorite
+309=Favourite
 310=Function
 311=Rooms
 312=DoorLock List
@@ -526,7 +526,7 @@
 1007=DLNA Server Music
 1008=Network Streaming Music
 1009=My Playlists
-1010=My Favorite
+1010=My Favourite
 1011=My Setup
 1012=CD
 1013=Playlists
@@ -540,7 +540,7 @@
 1021=My playlists
 1022=Save To Music Player
 1023=Device List
-1024=My Favorite
+1024=My Favourite
 1025=Prompt 
 1026=No Supported Device found
 1027=OK
@@ -552,8 +552,8 @@
 1033=SD Card
 1034=NAS
 1035=Online Radio
-1036=Favorite Music
-1037=Favorite Radio
+1036=Favourite Music
+1037=Favourite Radio
 1038=Online Music
 1039=Single Cycle
 1040=Shuffle
@@ -890,7 +890,7 @@
 10066锛滱dd File failed
 10067=Backup Data?
 10068=Data Backup Succeeded
-10069= Download and Restore Data?
+10069=Downloaded and data restored.
 10070=Restore Succeeded
 10071=Please Log in
 10072=Contact
diff --git a/Crabtree/ON/Assets/Language.ini b/Crabtree/ON/Assets/Language.ini
index d6dc8cc..631a546 100644
--- a/Crabtree/ON/Assets/Language.ini
+++ b/Crabtree/ON/Assets/Language.ini
@@ -305,7 +305,7 @@
 306=Theme
 307=Theme changed successfully. Please restart the application.
 308=Restore default skin
-309=Favorite
+309=Favourite
 310=Devices
 311=Rooms
 312=DoorLock List
@@ -502,7 +502,7 @@
 1007=DLNA Server Music
 1008=Network Streaming Music
 1009=My Playlists
-1010=My Favorite
+1010=My Favourite
 1011=My Setup
 1012=CD
 1013=Playlists
@@ -516,7 +516,7 @@
 1021=My playlists
 1022=Save To Music Player
 1023=Device List
-1024=My Favorite
+1024=My Favourite
 1025=Prompt 
 1026=No Supported Device found
 1027=OK
@@ -528,8 +528,8 @@
 1033=SD Card
 1034=NAS
 1035=Online Radio
-1036=Favorite Music
-1037=Favorite Radio
+1036=Favourite Music
+1037=Favourite Radio
 1038=Online Music
 1039=Single Cycle
 1040=Shuffle
@@ -696,7 +696,7 @@
 10066锛滱dd File failed
 10067=Backup Data?
 10068=Data Backup Succeeded
-10069= Download and Restore Data?
+10069=Downloaded and data restored.
 10070=Restore Succeeded
 10071=Please Log in
 10072=Contact
diff --git a/Crabtree/ON/Properties/AndroidManifest.xml b/Crabtree/ON/Properties/AndroidManifest.xml
index 0ac5504..3d09cb2 100644
--- a/Crabtree/ON/Properties/AndroidManifest.xml
+++ b/Crabtree/ON/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
 锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.crabtreenew" android:versionName="2.512081" android:versionCode="202012081">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.crabtreenew" android:versionName="2.512151" android:versionCode="202012151">
 	<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" />
 	<!-- 鍦ㄥ畨鍗揚鐗堟湰涔嬪悗锛屽繀椤昏鎺堜簣FOREGROUND_SERVICE鏉冮檺锛屾墠鑳藉浣跨敤鍓嶅彴鏈嶅姟 -->
 	<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
diff --git a/Crabtree/SmartHome/HDL/Operation/ResponseEntity/ErrorCode.cs b/Crabtree/SmartHome/HDL/Operation/ResponseEntity/ErrorCode.cs
index 3848707..eecfbb1 100644
--- a/Crabtree/SmartHome/HDL/Operation/ResponseEntity/ErrorCode.cs
+++ b/Crabtree/SmartHome/HDL/Operation/ResponseEntity/ErrorCode.cs
@@ -78,7 +78,20 @@
         public readonly static string PasswordStrengthNotMatch = "The password must be 8-20 characters, including at least one uppercase and lowercase letters, numbers and special characters.";
         //瀵嗙爜涓嶈兘鍖呭惈鐢ㄦ埛鍚�
         public readonly static string PasswordNotUsername = "Password cannot contain username";
+        //鎮ㄧ殑鎵嬫満鏈繛鎺IFI缃戠粶锛岃杩炴帴
+        public readonly static string NotConnectedToWIFI= "Your phone in not connected to WIFI network, please connect.";
+        //璇风‘淇濈綉鍏虫槸閫氱數鐨勶紝杩炴帴鍒癢iFi璺敱鍣ㄤ笂銆�
+        public readonly static string MakeSureGatewayIsPoweredUp = "Please make sure gateway is powered up and connect to WiFi router.";
+        //濡傛灉鍒楄〃涓病鏈夋墍鏈夌綉鍏筹紝鍒欏彲浠ュ啀娆℃悳绱€��
+        public readonly static string IfAllTheGatewaysAreNotInTheList = "If all the gateways are not in the list, you can search again.";
+        //姝e湪鎼滅储锛岃鐐瑰嚮姝ゅ閫�鍑烘悳绱㈡ā寮忋��
+        public readonly static string SearchingExitTheSearchingMode = "Searching, Please touch here to exit the searching mode.";
+        //姝e湪鎼滅储鏂拌澶囷紝璇风‘淇濇墍鏈夋柊璁惧閮藉浜庨厤缃ā寮忋��
+        public readonly static string SearchingForNewDevices = "Searching for new devices, Please make sure all new devices are in configuration mode.";
+        //澶囨敞闀垮害瓒呰繃闄愬埗銆�
+        public readonly static string RemarkLengthExceededTheLimit = "Device name length exceeded the limit.";
+        //澶囨敞涓嶈兘涓虹┖銆�
+        public readonly static string RemarksCannotBeEmpty = "Device name cannot be empty";
 
-        
     }
 }
diff --git a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
index a5ebb60..47cc5a4 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
@@ -38,7 +38,7 @@
         //public static Button LogoButton = new Button ();
   
 
-        public static string RequestVersion = "2.512081";
+        public static string RequestVersion = "2.512151";
         public static UserInfo LoginUser;
         /// <summary>
         /// 鏄惁鏄鐞嗗憳鏉冮檺(鍙樻洿浜�,鎴愬憳鐨勬椂鍊�,杩欎釜涔熶负ture銆備负浠�涔堜細澹版槑杩欐牱鍙橀噺,鍥犱负鏈変簺鎺ュ彛蹇呴』浣跨敤鍘熸潵鐨凾oken)
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs
index 1a363c3..f08fd6d 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs
@@ -353,7 +353,7 @@
         void SearchGatewayList ()
         {
             if (UserConfig.Instance.internetStatus == 0 || UserConfig.Instance.internetStatus == 1) {
-                Alert checkInternetAlert = new Alert ("", "Your phone in not connected to WIFI network, please connet", "Close", "Search again");
+                Alert checkInternetAlert = new Alert ("", ErrorCode.NotConnectedToWIFI, "Close", "Search again");
 
                 checkInternetAlert.Show ();
 
@@ -445,7 +445,7 @@
                         } else {
                             if (this != null && this.Parent != null) {
                                 if (inThisView) {// this.Parent.GetChildren (this.Parent.ChildrenCount - 1) == this) {
-                                    Alert confirmAlert1 = new Alert ("", "If not all the gateways are in the list,you can search again.", "Close", "Search again");
+                                    Alert confirmAlert1 = new Alert ("", ErrorCode.IfAllTheGatewaysAreNotInTheList, "Close", "Search again");
 
                                     confirmAlert1.Show ();
                                     confirmAlert1.ResultEventHandler += (ddf, ddd) => {
@@ -472,7 +472,7 @@
             if (UserConfig.Instance.IsLocalEncrypt) {
                 //瀵嗙爜妫�楠屾纭�
                 if (UserConfig.Instance.EncryptedPasswordCorrect) {
-                    Alert confirmAlert = new Alert ("", "Please make sure gateway is powered up and comect to WiFi router.", "Close", "Search again");
+                    Alert confirmAlert = new Alert ("", ErrorCode.MakeSureGatewayIsPoweredUp, "Close", "Search again");
                     confirmAlert.Show ();
                     confirmAlert.ResultEventHandler += (ddf, ddd) => {
                         MainPage.Loading.Hide ();
@@ -492,7 +492,7 @@
 
                 }
             } else {
-                Alert confirmAlert = new Alert ("", "Please make sure gateway is powered up and comect to WiFi router.", "Close", "Search again");
+                Alert confirmAlert = new Alert ("", ErrorCode.MakeSureGatewayIsPoweredUp, "Close", "Search again");
                 confirmAlert.Show ();
                 confirmAlert.ResultEventHandler += (ddf, ddd) => {
                     MainPage.Loading.Hide ();
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
index 135c50c..14fa2e4 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
@@ -249,11 +249,11 @@
                         if (gatewayDeicve.Type == DeviceType.OnePortWirelessFR || gatewayDeicve.Type == DeviceType.OnePortMqttFR) {
                             Control.ControlBytesSend (Command.GotoConfigMode, gatewayDeicve.SubnetID, gatewayDeicve.DeviceID, new byte [] { });
                             //new Alert ("", "缃戝叧宸茬粡杩涘叆閰嶉妯″紡锛岃鎵嬪姩鏂拌澶囪繘鍏ラ厤棰戞ā寮忋��", "Close").Show ();
-                            new Alert ("", "Searching for new devices, Please make sure all new devices are in configuration mode.", "OK").Show ();
+                            new Alert ("", ErrorCode.SearchingForNewDevices, "OK").Show ();
 
                             this.AddChidren (myLoading);
                             //myLoading.Start ("鐐瑰嚮灞忓箷鍏抽棴閰嶉妯″紡");
-                            myLoading.Start ("Searching, Please touch the here to exit the searching mode.");
+                            myLoading.Start (ErrorCode.SearchingExitTheSearchingMode);
                             //myLoading.Start ("Waiting for new device, Please touch the here to exit the waiting mode.");
                             
                             this.AddChidren (btnCloseLoading);
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/GenericDialog.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/GenericDialog.cs
index e4a9e60..6e22cda 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/GenericDialog.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/GenericDialog.cs
@@ -62,7 +62,7 @@
 
                 if (remakeBytes.Length > 20) {
                     etDeviceName.Text = CommonPage.MyEncodingGB2312.GetString (remakeBytes, 0, 20);
-                    new Alert ("", "Remark length exceeded the limit. ", "Close").Show ();
+                    new Alert ("", ErrorCode.RemarkLengthExceededTheLimit, "Close").Show ();
                 }
             };
 
@@ -96,9 +96,16 @@
             dialogBottomView.AddChidren (editor);
 
             editor.MouseUpEventHandler += (dff, ffd) => {
-                byte [] remakeBytes = CommonPage.MyEncodingGB2312.GetBytes (etDeviceName.Text.Trim ());
+                string remakeStr = etDeviceName.Text.Trim ();
+                if (string.IsNullOrEmpty (remakeStr)) {
+                    //澶囨敞涓嶈兘涓虹┖
+                    new Alert ("", ErrorCode.RemarksCannotBeEmpty, "Close").Show ();
+                    return;
+                }
+
+                byte [] remakeBytes = CommonPage.MyEncodingGB2312.GetBytes (remakeStr);
                 if (remakeBytes.Length > 20) {
-                    new Alert ("", "Remark length exceeded the limit. ", "Close").Show ();
+                    new Alert ("", ErrorCode.RemarkLengthExceededTheLimit, "Close").Show ();
                     return;
                 }
 
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs
index bccbcbb..7dbb41c 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs
@@ -474,7 +474,7 @@
 
                                     if (remakeBytes.Length > 20) {
                                         etDeviceName.Text = CommonPage.MyEncodingGB2312.GetString (remakeBytes, 0, 20);
-                                        new Alert ("", "Remark length exceeded the limit. ", "Close").Show ();
+                                        new Alert ("", ErrorCode.RemarkLengthExceededTheLimit, "Close").Show ();
                                     }
                                 };
 
@@ -508,12 +508,18 @@
                                 dialogBottomView.AddChidren (editor);
 
                                 editor.MouseUpEventHandler += (dff, ffd) => {
-                                    byte [] remakeBytes = CommonPage.MyEncodingGB2312.GetBytes (etDeviceName.Text.Trim ());
-                                    if (remakeBytes.Length > 20) {
-                                        new Alert ("", "Remark length exceeded the limit. ", "Close").Show ();
+                                    string remakeStr = etDeviceName.Text.Trim ();
+                                    if (string.IsNullOrEmpty (remakeStr)) {
+                                        //澶囨敞涓嶈兘涓虹┖
+                                        new Alert ("", ErrorCode.RemarksCannotBeEmpty, "Close").Show ();
                                         return;
                                     }
 
+                                    byte [] remakeBytes = CommonPage.MyEncodingGB2312.GetBytes (remakeStr);
+                                    if (remakeBytes.Length > 20) {
+                                        new Alert ("", ErrorCode.RemarkLengthExceededTheLimit, "Close").Show ();
+                                        return;
+                                    }
 
                                     MainPage.Loading.Start ();
                                     //byte [] remakeBytes = CommonPage.MyEncodingGB2312.GetBytes (etDeviceName.Text.Trim ());
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs
index 0682b47..9f8472d 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs
@@ -570,14 +570,14 @@
 
                 if (btnMonday.IsSelected == false && btnFriday.IsSelected == false && btnThursday.IsSelected == false && btnSunday.IsSelected == false && btnTuesday.IsSelected == false && btnSaturday.IsSelected == false && btnWednesday.IsSelected == false) {
                     //new Alert ("", "璇烽�夋嫨鏃ユ湡!", "Close").Show ();
-                    new Alert ("", "Please setting date!", "Close").Show ();
+                    new Alert ("", "Please select the days.", "Close").Show ();
                     return;
                 }
 
                 string mTimerName = etName.Text.Trim ();
                 if (string.IsNullOrEmpty (mTimerName)) {
                     //new Alert ("", "璇峰~鍐欏畾鏃跺櫒鍚嶇О!", "Close").Show ();
-                    new Alert ("", "Please set name for the timer!", "Close").Show ();
+                    new Alert ("", "Please fill the tab Lable name.", "Close").Show ();
                     return;
                 }
                 //else if (listTimer.Find ((obj) => obj.TimerName == timerTemp.TimerName) != null && !isEdit) {//2020-01-09 缂栬緫鐨勬椂鍊欎篃鎻愮ず閲嶅鍚嶅瓧

--
Gitblit v1.8.0