From 70d2b7cd0c8fe5dfb29bb2baf96997575ade2bac Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 08 七月 2021 18:34:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/newBranch1' into WJC

---
 HDL_ON/UI/UI1-Login/LoginPage.cs |  148 ++++++++++++++++++++++++++----------------------
 1 files changed, 80 insertions(+), 68 deletions(-)

diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 14c1026..58ce5a1 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Text.RegularExpressions;
 using System.Threading;
+using HDL_ON.Common;
 using HDL_ON.DAL.Server;
 using HDL_ON.Entity;
 using HDL_ON.UI.CSS;
@@ -202,8 +203,9 @@
                 //return;
                 if (b)
                 {
-                    etAccount.Text = "15626203746";//娴嬭瘯鏈嶅姟鍣�
+                    //etAccount.Text = "tf@smarttech.com.ua";//鍥藉璐﹀彿锛屾湁浣忓畢锛岀櫥褰曟棤娉曟樉绀�
                     //etAccount.Text = "13375012446";//娴嬭瘯鏈嶅姟鍣�
+                    etAccount.Text = "13450425803";
                     //etAccount.Text = "1033326940@qq.com";
                     //etAccount.Text = "18022428438";//wjc
                     //etAccount.Text = "13602944661";//kx
@@ -211,22 +213,32 @@
                     //etAccount.Text = "18316672920";//lcg "18316672920";//hzx;// "13415629083"//cf;;
                     //etAccount.Text = "18316120654";//tujie
                     // "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 
+                    etAccount.Text = "15626203746";
+                    //etAccount.Text = "13450425807";//榛勭婧� knx椤圭洰
                 }
                 else
                 {
-                    etAccount.Text = "464027401@qq.com";//
+                    //etAccount.Text = "15018447586";//闊充箰鏁伴噺鍒锋柊闂
+                    //etAccount.Text = "464027401@qq.com";//
                     //etAccount.Text = "15217626103";//
                     //etAccount.Text = "13682244600";//娉㈠摜
-                    //etAccount.Text = "BB01010101@evoyo.com";//鍙瀵硅
+                    //etAccount.Text = "13168123446";//鏄嗘槑閲戣寕椤圭洰锛屾柊椋庨棶棰�
+                    etAccount.Text = "551775569@qq.com";
+                    etAccount.Text = "2949126848@qq.com";//闄堢惓cct娴嬭瘯
                     //etAccount.Text = "13168123446";
                     //etAccount.Text = "13676202754";//宸存灄鏈嶅姟鍣�
                     //etAccount.Text = "13602944661";//kx
                     //etAccount.Text = "551775569@qq.com";//wcf
                     //etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374
                     //etAccount.Text = "15971583093";// gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 鍥藉鏈嶅姟鍣ㄦ祴璇�
+                    etAccount.Text = "15971583093";//楂樿儨 璋冨厜0 100 鍙嶅妯烦
                 }
                 b = !b;
                 etPassword.Text = "123456";
+                if(etAccount.Text == "15626203746")
+                {
+                    etPassword.Text = "12345678";
+                }
                 btnLogin.IsSelected = true;
             };
 #endif
@@ -320,7 +332,7 @@
             };
             accountView.AddChidren(etAccount);
 
-            if (userInfo != null)
+            if (userInfo != null && userInfo.ID != "1234567890")
             {
                 registerEmail = userInfo.userEmailInfo;
                 etAccount.Text = registerPhone = userInfo.userMobileInfo;
@@ -507,11 +519,16 @@
                 IsBold = true,
                 TextColor = CSS_Color.MainColor,
                 TextAlignment = TextAlignment.Center,
-                Text = "浣撻獙妯″紡"
+                Text = "Demo妯″紡"
             };
             bodyView.AddChidren(btnDomeLogin);
             btnDomeLogin.MouseUpEventHandler = (sender, e) => {
+
                 MainPage.NoLoginMode = true;
+#if DEBUG
+                FileUtlis.Files.DeleteAllFile();
+#endif
+
                 //妤煎眰鎴块棿鍒楄〃
                 var floor1 = new SpatialInfo("FLOOR") { roomName = "F1", parentId = DB_ResidenceData.Instance.CurrentRegion.id };
                 floor1.SaveRoomFile();
@@ -521,7 +538,7 @@
                 var room1 = new Room()
                 {
                     roomId = "1405771366041378818",
-                    roomName = "娲楁墜闂�",
+                    roomName = Language.CurrentLanguage == "Chinese"? "娲楁墜闂�" : "Restroom",
                     roomImage = "Classification/Room/Roombg.png",
                     uid = "47c98953-6fd4-4379-88b9-4b748963504f",
                     roomType = "ROOM",
@@ -529,27 +546,27 @@
                     homeId = "1396717478877241345",
                     createTime = "1623996986290",
                     modifyTime = "1623996986290",
-                    floorRoomName = "1F-娲楁墜闂�"
+                    floorRoomName = "1F-Restroom"
                 };
                 room1.SaveRoomFile();
-                var room2 = new Room()
-                {
-                    roomId = "1405771310345216001",
-                    roomName = "涓诲崸",
-                    roomImage = "Classification/Room/Roombg.png",
-                    uid = "168d27a1-9e53-42c0-95c9-f5cbf41ea167",
-                    roomType = "ROOM",
-                    parentId = "2348be0f-eec2-43c4-b74d-9b6037a5ba55",
-                    homeId = "1396717478877241345",
-                    createTime = "1623996973011",
-                    modifyTime = "1623996973011",
-                    floorRoomName = "1F-涓诲崸"
-                };
-                room2.SaveRoomFile();
+                //var room2 = new Room()
+                //{
+                //    roomId = "1405771310345216001",
+                //    roomName = Language.CurrentLanguage == "Chinese"? "涓诲崸" : "Master bedroom",
+                //    roomImage = "Classification/Room/Roombg.png",
+                //    uid = "168d27a1-9e53-42c0-95c9-f5cbf41ea167",
+                //    roomType = "ROOM",
+                //    parentId = "2348be0f-eec2-43c4-b74d-9b6037a5ba55",
+                //    homeId = "1396717478877241345",
+                //    createTime = "1623996973011",
+                //    modifyTime = "1623996973011",
+                //    floorRoomName = "1F-Master bedroom"
+                //};
+                //room2.SaveRoomFile();
                 var room3 = new Room()
                 {
                     roomId = "1405771193802285057",
-                    roomName = "椁愬巺",
+                    roomName = Language.CurrentLanguage == "Chinese"? "椁愬巺" : "Restaurant",
                     roomImage = "Classification/Room/Roombg.png",
                     uid = "ed7fc784-aace-44b8-97a3-bc3e727e598b",
                     roomType = "ROOM",
@@ -557,13 +574,13 @@
                     homeId = "1396717478877241345",
                     createTime = "1623996945225",
                     modifyTime = "1623996945225",
-                    floorRoomName = "1F-椁愬巺"
+                    floorRoomName = "1F-Restaurant"
                 };
                 room3.SaveRoomFile();
                 var room4 = new Room()
                 {
                     roomId = "1405771024583090178",
-                    roomName = "瀹㈠巺",
+                    roomName = Language.CurrentLanguage == "Chinese"? "瀹㈠巺" : "Drawing room",
                     roomImage = "Classification/Room/Roombg.png",
                     uid = "9191a3a2-026f-4667-a0b1-e3af699e7295",
                     roomType = "ROOM",
@@ -571,7 +588,7 @@
                     homeId = "1396717478877241345",
                     createTime = "1623996904880",
                     modifyTime = "1623996904880",
-                    floorRoomName = "1F-瀹㈠巺"
+                    floorRoomName = "1F-Drawing room"
                 };
                 room4.SaveRoomFile();
                 var floor = new SpatialInfo()
@@ -590,7 +607,7 @@
 
                 SpatialInfo.CurrentSpatial.FloorList.Add(floor);
                 SpatialInfo.CurrentSpatial.RoomList.Add(room1);
-                SpatialInfo.CurrentSpatial.RoomList.Add(room2);
+                //SpatialInfo.CurrentSpatial.RoomList.Add(room2);
                 SpatialInfo.CurrentSpatial.RoomList.Add(room3);
                 SpatialInfo.CurrentSpatial.RoomList.Add(room4);
 
@@ -601,7 +618,7 @@
                 {
                     sid = "light1",
                     deviceId = "light1",
-                    name = "RGB1",
+                    name = Language.CurrentLanguage == "Chinese"?  "瀹㈠巺姘涘洿鐏�1": "RGB light 1",
                     spk = SPK.LightRGB,
                     roomIds = new List<string>() { "1405771024583090178"},
                     collect = true,
@@ -619,7 +636,7 @@
                 {
                     sid = "light2",
                     deviceId = "light2",
-                    name = "RGB2",
+                    name = Language.CurrentLanguage == "Chinese" ? "瀹㈠巺姘涘洿鐏�2" : "RGB light 2",
                     spk = SPK.LightRGB,
                     roomIds = new List<string>() { "1405771024583090178"},
                     attributes = new List<FunctionAttributes>()
@@ -636,7 +653,7 @@
                 {
                     sid = "light3",
                     deviceId = "light3",
-                    name = "CCT1",
+                    name = Language.CurrentLanguage == "Chinese" ? "闃呰鐏�" : "CCT light",
                     spk = SPK.LightCCT,
                     roomIds = new List<string>() { "1405771024583090178"},
                     attributes = new List<FunctionAttributes>()
@@ -653,9 +670,9 @@
                 {
                     sid = "light4",
                     deviceId = "light4",
-                    name = "寮�鍏崇伅1",
+                    name = Language.CurrentLanguage == "Chinese" ? "澶х伅" : "light 1",
                     spk = SPK.LightSwitch,
-                    roomIds = new List<string>() { "1405771024583090178"},
+                    roomIds = new List<string>() { "1405771024583090178" },
                     attributes = new List<FunctionAttributes>()
                     {
                         new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on"   },
@@ -668,7 +685,7 @@
                 {
                     sid = "light5",
                     deviceId = "light5",
-                    name = "寮�鍏崇伅2",
+                    name = Language.CurrentLanguage == "Chinese" ? "寮�鍏崇伅" : "light 2",
                     spk = SPK.LightSwitch,
                     roomIds = new List<string>() { "1405771024583090178"},
                     attributes = new List<FunctionAttributes>()
@@ -683,7 +700,7 @@
                 {
                     sid = "curtain1",
                     deviceId = "curtain1",
-                    name = "寮�鍚堝笜",
+                    name = Language.CurrentLanguage == "Chinese" ? "寮�鍚堝笜" : "Curtain 1",
                     spk = SPK.CurtainTrietex,
                     roomIds = new List<string>() { "1405771024583090178"},
                     attributes = new List<FunctionAttributes>()
@@ -697,7 +714,7 @@
                 {
                     sid = "curtain2",
                     deviceId = "curtain2",
-                    name = "鍗峰笜",
+                    name = Language.CurrentLanguage == "Chinese" ? "鍗峰笜" : "Curtain 2",
                     spk = SPK.CurtainRoller,
                     roomIds = new List<string>() { "1405771024583090178"},
                     attributes = new List<FunctionAttributes>()
@@ -711,7 +728,7 @@
                 {
                     sid = "floorheat1",
                     deviceId = "floorheat1",
-                    name = "鍦版殩",
+                    name = Language.CurrentLanguage == "Chinese" ? "鍦版殩" : "Floorheat 1",
                     spk = SPK.FloorHeatStandard,
                     roomIds = new List<string>() { "1405771024583090178"},
                     attributes = new List<FunctionAttributes>()
@@ -729,7 +746,7 @@
                 {
                     sid = "scene1",
                     userSceneId = "scene1",
-                    name = "鏄庝寒妯″紡",
+                    name = Language.CurrentLanguage == "Chinese" ? "鏄庝寒妯″紡" : "Bright scene",
                     roomIds = new List<string>() { "1405771024583090178" },
                     gatewayId = "1234567890123456",
                     collect = true,
@@ -804,7 +821,7 @@
                 {
                     sid = "scene2",
                     userSceneId = "scene2",
-                    name = "娴极妯″紡",
+                    name = Language.CurrentLanguage == "Chinese" ? "娴极妯″紡" : "Romantic scene",
                     roomIds = new List<string>() { "1405771024583090178" },
                     gatewayId = "1234567890123456",
                     collect = false,
@@ -883,7 +900,7 @@
                 {
                     sid = "light6",
                     deviceId = "light6",
-                    name = "椁愬巺鐏�1",
+                    name = Language.CurrentLanguage == "Chinese" ? "椁愬巺鐏�1" : "Dining room light 1",
                     spk = SPK.LightSwitch,
                     roomIds = new List<string>() { room3.roomId },
                     attributes = new List<FunctionAttributes>()
@@ -898,7 +915,7 @@
                 {
                     sid = "light7",
                     deviceId = "light7",
-                    name = "椁愬巺鐏�2",
+                    name = Language.CurrentLanguage == "Chinese" ? "椁愬巺鐏�2" : "Dining room light 2",
                     spk = SPK.LightSwitch,
                     roomIds = new List<string>() { room3.roomId },
                     attributes = new List<FunctionAttributes>()
@@ -913,7 +930,7 @@
                 {
                     sid = "scene3",
                     userSceneId = "scene3",
-                    name = "娓╅Θ妯″紡",
+                    name = Language.CurrentLanguage == "Chinese" ? "娓╅Θ妯″紡" : "Warm scene",
                     roomIds = new List<string>() { room3.roomId },
                     gatewayId = "1234567890123456",
                     collect = true,
@@ -950,7 +967,7 @@
                 {
                     sid = "scene4",
                     userSceneId = "scene4",
-                    name = "瑗块妯″紡",
+                    name = Language.CurrentLanguage == "Chinese" ? "瑗块妯″紡" : "Western food mode",
                     roomIds = new List<string>() { room3.roomId },
                     gatewayId = "1234567890123456",
                     collect = false,
@@ -989,7 +1006,7 @@
                 {
                     sid = "ac1",
                     deviceId = "ac1",
-                    name = "鍗у绌鸿皟",
+                    name = Language.CurrentLanguage == "Chinese" ? "鍗у绌鸿皟" : "Bedroom air conditioning",
                     spk = SPK.AcStandard,
                     roomIds = new List<string>() { room3.roomId },
                     attributes = new List<FunctionAttributes>()
@@ -1003,26 +1020,26 @@
                     }
                 };
                 ac.SaveFunctionFile();
-                var scene5 = new Scene()
-                {
-                    sid = "scene5",
-                    userSceneId = "scene5",
-                    name = "闃呰",
-                    roomIds = new List<string>() { room2.roomId },
-                    gatewayId = "1234567890123456",
-                    collect = true,
-                };
-                scene5.SaveSceneFile();
-                var scene6 = new Scene()
-                {
-                    sid = "scene6",
-                    userSceneId = "scene6",
-                    name = "璧峰簥",
-                    roomIds = new List<string>() { room2.roomId },
-                    gatewayId = "1234567890123456",
-                    collect = false,
-                };
-                scene6.SaveSceneFile();
+                //var scene5 = new Scene()
+                //{
+                //    sid = "scene5",
+                //    userSceneId = "scene5",
+                //    name = Language.CurrentLanguage == "Chinese" ? "闃呰" : "Reading mode",
+                //    roomIds = new List<string>() { room2.roomId },
+                //    gatewayId = "1234567890123456",
+                //    collect = true,
+                //};
+                //scene5.SaveSceneFile();
+                //var scene6 = new Scene()
+                //{
+                //    sid = "scene6",
+                //    userSceneId = "scene6",
+                //    name = Language.CurrentLanguage == "Chinese" ? "璧峰簥" : "Wake up scene",
+                //    roomIds = new List<string>() { room2.roomId },
+                //    gatewayId = "1234567890123456",
+                //    collect = false,
+                //};
+                //scene6.SaveSceneFile();
                 #endregion
 
 
@@ -1030,7 +1047,7 @@
                 {
                     sid = "lightSwitch6",
                     deviceId = "lightSwitch6",
-                    name = "娲楁墜闂寸伅",
+                    name = Language.CurrentLanguage == "Chinese" ? "娲楁墜闂寸伅" : "Toilet light",
                     spk = SPK.LightSwitch,
                     roomIds = new List<string>() { room1.roomId },
                     attributes = new List<FunctionAttributes>()
@@ -1045,11 +1062,6 @@
                 #endregion
 
                 var fileList = Common.FileUtlis.Files.ReadFiles();
-
-                foreach (var file in fileList)
-                {
-                    FunctionList.List.IniFunctionList(file,true);
-                }
 
                 Room.CurrentSpatial.InitRoomListFunctions();
 

--
Gitblit v1.8.0