| | |
| | | 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; |
| | |
| | | //return; |
| | | if (b) |
| | | { |
| | | etAccount.Text = "15626203746";//测试服务器 |
| | | //etAccount.Text = "tf@smarttech.com.ua";//国外账号,有住宅,登录无法显示 |
| | | //etAccount.Text = "13375012446";//测试服务器 |
| | | //etAccount.Text = "1033326940@qq.com"; |
| | | //etAccount.Text = "18022428438";//wjc |
| | | //etAccount.Text = "13602944661";//kx |
| | | //etAccount.Text = "13226233133";//豆豆 |
| | | //etAccount.Text = "18316672920";//lcg "18316672920";//hzx;// "13415629083"//cf;; |
| | | etAccount.Text = "13226233133";//豆豆 |
| | | etAccount.Text = "18316672920"; |
| | | //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 = "13168123446";//昆明金茂项目,新风问题 |
| | | //etAccount.Text = "2949126848@qq.com";//陈琳 |
| | | //etAccount.Text = "13415629083"; |
| | | //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";//高胜 |
| | | //etAccount.Text = "15217626103";//昆明金茂项目 |
| | | //etAccount.Text = "18598273624"; |
| | | //etAccount.Text = "tf@smarttech.com.ua"; |
| | | etAccount.Text = "18814122445";//董泽斌 天河办公室 |
| | | //etAccount.Text = "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 |
| | | etAccount.Text = "18402017839";//wjc |
| | | //etAccount.Text = "13430286286";//cwc |
| | | //etAccount.Text = "13709260805"; |
| | | //etAccount.Text = "support5@hdlchina.com.cn"; |
| | | //etAccount.Text = "13375012441"; |
| | | etAccount.Text = "info@smartlife-ks.com"; |
| | | etAccount.Text = "551775569@qq.com";//wcf |
| | | } |
| | | b = !b; |
| | | etPassword.Text = "123456"; |
| | | if(etAccount.Text == "fslcjm5@163.com") |
| | | { |
| | | etPassword.Text = "a123456"; |
| | | } |
| | | //etPassword.Text = "Hdl85521566"; |
| | | btnLogin.IsSelected = true; |
| | | }; |
| | | #endif |
| | |
| | | }; |
| | | accountView.AddChidren(etAccount); |
| | | |
| | | if (userInfo != null) |
| | | if (userInfo != null && userInfo.ID != "1234567890") |
| | | { |
| | | registerEmail = userInfo.userEmailInfo; |
| | | etAccount.Text = registerPhone = userInfo.userMobileInfo; |
| | |
| | | IsBold = true, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = "体验模式" |
| | | Text = "游客体验" |
| | | }; |
| | | bodyView.AddChidren(btnDomeLogin); |
| | | |
| | | if(Language.CurrentLanguage!= "Chinese") |
| | | { |
| | | btnDomeLogin.Text = "Tourist experience"; |
| | | } |
| | | |
| | | btnDomeLogin.MouseUpEventHandler = (sender, e) => { |
| | | |
| | | MainPage.NoLoginMode = true; |
| | | #if DEBUG |
| | | FileUtlis.Files.DeleteAllFile(); |
| | | #endif |
| | | //DB_ResidenceData.Instance.HomeGateway.gatewayType = "AGATEWAY"; |
| | | //楼层房间列表 |
| | | var floor1 = new SpatialInfo("FLOOR") { roomName = "F1", parentId = DB_ResidenceData.Instance.CurrentRegion.id }; |
| | | floor1.SaveRoomFile(); |
| | |
| | | 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", |
| | |
| | | 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", |
| | |
| | | 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", |
| | |
| | | homeId = "1396717478877241345", |
| | | createTime = "1623996904880", |
| | | modifyTime = "1623996904880", |
| | | floorRoomName = "1F-客厅" |
| | | floorRoomName = "1F-Drawing room" |
| | | }; |
| | | room4.SaveRoomFile(); |
| | | var floor = new SpatialInfo() |
| | |
| | | |
| | | 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); |
| | | |
| | |
| | | { |
| | | sid = "light1", |
| | | deviceId = "light1", |
| | | name = "RGB1", |
| | | name = Language.CurrentLanguage == "Chinese"? "客厅氛围灯1": "RGB light 1", |
| | | spk = SPK.LightRGB, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | collect = true, |
| | |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="100",state = "100" }, |
| | | new FunctionAttributes() { key = "rgb",value =new List<string>(){ "0","100" }, curValue="0,0,0",state = "0,0,0" }, |
| | | new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | //new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | new FunctionAttributes() { key = "delay",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | }, |
| | | }; |
| | |
| | | { |
| | | 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>() |
| | |
| | | { |
| | | sid = "light3", |
| | | deviceId = "light3", |
| | | name = "CCT1", |
| | | name = Language.CurrentLanguage == "Chinese" ? "阅读灯" : "CCT light", |
| | | spk = SPK.LightCCT, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | new FunctionAttributes() { key = "cct",value =new List<string>(){ "0","65535" }, curValue="0",state = "0" }, |
| | | new FunctionAttributes() { key = "cct",value =new List<string>(){ "0","65535" }, curValue="0",state = "0" ,min = 2700,max = 6500 }, |
| | | new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | new FunctionAttributes() { key = "delay",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | }, |
| | |
| | | { |
| | | sid = "light4", |
| | | deviceId = "light4", |
| | | name = "开关灯1", |
| | | spk = SPK.LightSwitch, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | name = Language.CurrentLanguage == "Chinese" ? "大灯" : "light 1", |
| | | spk = SPK.LightDimming, |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="100",state = "100" }, |
| | | new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | }, |
| | | }; |
| | |
| | | { |
| | | sid = "light5", |
| | | deviceId = "light5", |
| | | name = "开关灯2", |
| | | name = Language.CurrentLanguage == "Chinese" ? "开关灯" : "light 2", |
| | | spk = SPK.LightSwitch, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | }, |
| | | }; |
| | |
| | | { |
| | | sid = "curtain1", |
| | | deviceId = "curtain1", |
| | | name = "开合帘", |
| | | name = Language.CurrentLanguage == "Chinese" ? "开合帘" : "Curtain 1", |
| | | spk = SPK.CurtainTrietex, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | { |
| | | sid = "curtain2", |
| | | deviceId = "curtain2", |
| | | name = "卷帘", |
| | | name = Language.CurrentLanguage == "Chinese" ? "卷帘" : "Curtain 2", |
| | | spk = SPK.CurtainRoller, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | { |
| | | sid = "floorheat1", |
| | | deviceId = "floorheat1", |
| | | name = "地暖", |
| | | name = Language.CurrentLanguage == "Chinese" ? "地暖" : "Floorheat 1", |
| | | spk = SPK.FloorHeatStandard, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "mode",value =new List<string>(){ "day", "night", "away", "normal", "timer" }, curValue="day",state = "day" }, |
| | | new FunctionAttributes() { key = "set_temp",value =new List<string>(){ "" }, curValue="26",state = "26" }, |
| | | new FunctionAttributes() { key = "set_temp",value =new List<string>(){ "" }, curValue="26",state = "26" ,max = 35,min = 5 }, |
| | | new FunctionAttributes() { key = "room_temp",value =new List<string>(){ "" }, curValue="26",state = "26" }, |
| | | }, |
| | | }; |
| | |
| | | { |
| | | sid = "scene1", |
| | | userSceneId = "scene1", |
| | | name = "明亮模式", |
| | | name = Language.CurrentLanguage == "Chinese" ? "明亮模式" : "Bright scene", |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | gatewayId = "1234567890123456", |
| | | collect = true, |
| | |
| | | { |
| | | sid = "scene2", |
| | | userSceneId = "scene2", |
| | | name = "浪漫模式", |
| | | name = Language.CurrentLanguage == "Chinese" ? "浪漫模式" : "Romantic scene", |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | gatewayId = "1234567890123456", |
| | | collect = false, |
| | |
| | | { |
| | | sid = "light6", |
| | | deviceId = "light6", |
| | | name = "餐厅灯1", |
| | | spk = SPK.LightSwitch, |
| | | name = Language.CurrentLanguage == "Chinese" ? "餐厅灯1" : "Dining room light 1", |
| | | spk = SPK.LightDimming, |
| | | roomIds = new List<string>() { room3.roomId }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="100",state = "100" }, |
| | | new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | }, |
| | | }; |
| | |
| | | { |
| | | 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>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | }, |
| | | }; |
| | |
| | | { |
| | | sid = "scene3", |
| | | userSceneId = "scene3", |
| | | name = "温馨模式", |
| | | name = Language.CurrentLanguage == "Chinese" ? "温馨模式" : "Warm scene", |
| | | roomIds = new List<string>() { room3.roomId }, |
| | | gatewayId = "1234567890123456", |
| | | collect = true, |
| | |
| | | { |
| | | sid = "scene4", |
| | | userSceneId = "scene4", |
| | | name = "西餐模式", |
| | | name = Language.CurrentLanguage == "Chinese" ? "西餐模式" : "Western food mode", |
| | | roomIds = new List<string>() { room3.roomId }, |
| | | gatewayId = "1234567890123456", |
| | | collect = false, |
| | |
| | | { |
| | | 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>() |
| | |
| | | } |
| | | }; |
| | | 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 |
| | | |
| | | |
| | |
| | | { |
| | | sid = "lightSwitch6", |
| | | deviceId = "lightSwitch6", |
| | | name = "洗手间灯", |
| | | name = Language.CurrentLanguage == "Chinese" ? "洗手间灯" : "Toilet light", |
| | | spk = SPK.LightSwitch, |
| | | roomIds = new List<string>() { room1.roomId }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, |
| | | }, |
| | | }; |
| | |
| | | #endregion |
| | | |
| | | var fileList = Common.FileUtlis.Files.ReadFiles(); |
| | | |
| | | foreach (var file in fileList) |
| | | foreach(var file in fileList) |
| | | { |
| | | FunctionList.List.IniFunctionList(file,true); |
| | | } |
| | | |
| | | Room.CurrentSpatial.InitRoomListFunctions(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | frameRow.AddChidren(agreeView); |
| | | if(Language.CurrentLanguage == "Chinese") |
| | | { |
| | | agreeView.X = Application.GetRealWidth(82); |
| | | agreeView.X = Application.GetRealWidth(52); |
| | | } |
| | | //同意图标按钮 |
| | | var agreeBtn = new Button() |