From ac39680a5ace5c02c63369014993fbfc959dbe5f Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 24 二月 2020 09:09:10 +0800 Subject: [PATCH] 2020-02-24 1.优化更新。 --- Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaDeviceListPage.cs | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaDeviceListPage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaDeviceListPage.cs index 8883165..f042ff9 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaDeviceListPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Alexa/AlexaDeviceListPage.cs @@ -88,7 +88,7 @@ ItemButton.MouseUpEventHandler += (sender, e) => { Action action = () => { Application.RunOnMainThread (() => { - MainPage.Loading.Start ("please wait..."); + MainPage.Loading.Start ("Please wait..."); }); System.Threading.Tasks.Task.Run (() => { try { @@ -111,7 +111,7 @@ System.Threading.Tasks.Task.Factory.StartNew (() => { try { Application.RunOnMainThread (() => { - MainPage.Loading.Start ("please wait..."); + MainPage.Loading.Start ("Please wait..."); }); foreach (var newDevicePath in roomDeviceFilePathList) { var common = Newtonsoft.Json.JsonConvert.DeserializeObject<Common> (CommonPage.MyEncodingUTF8.GetString (IO.FileUtils.ReadFile (newDevicePath))); @@ -384,7 +384,7 @@ System.Threading.Tasks.Task.Factory.StartNew (() => { try { Application.RunOnMainThread (() => { - MainPage.Loading.Start ("please wait..."); + MainPage.Loading.Start ("Please wait..."); }); var tempRoom = new Room (); foreach (var device in alexaDeviceLista) {//鐗规畩澶勭悊鏈嶅姟鍣ㄤ笌鏈湴璁惧绫诲瀷涓嶄竴鏍风殑璁惧 @@ -434,7 +434,7 @@ var deviceList = new List<UpdateDeviceObj> (); var requestObj = new GetDeviceListObj () { RegionID = UserConfig.Instance.CurrentRegion.Id }; var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj); - var revertObj = MainPage.RequestHttps (API.GetDeviceList, requestJson, true); + var revertObj = MainPage.RequestHttps (API.GetDeviceList, requestJson); if (revertObj.StateCode.ToUpper() == "SUCCESS") { deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<UpdateDeviceObj>> (revertObj.ResponseData.ToString()); } @@ -459,7 +459,7 @@ } //var requestObj = new UploadDevicesObj () { Device = uploadDevice }; var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (uploadDevice); - var revertObj = MainPage.RequestHttps (API.UploadDevices, requestJson, true); + var revertObj = MainPage.RequestHttps (API.UploadDevices, requestJson); if (revertObj.StateCode.ToUpper() == "SUCCESS") { return true; } @@ -473,7 +473,7 @@ { var requestObj = new DelDeviceObj () { Id = commonId }; var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj); - var revertObj = MainPage.RequestHttps (API.DeleteDevice, requestJson, true); + var revertObj = MainPage.RequestHttps (API.DeleteDevice, requestJson); if (revertObj.StateCode.ToUpper() == "SUCCESS") { return true; } @@ -490,7 +490,7 @@ var sceneList = new List<SceneByRegion> (); var requestObj = new SceneByRegionListObj () { RegionID = UserConfig.Instance.CurrentRegion.Id }; var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj); - var revertObj = MainPage.RequestHttps (API.GetSceneList, requestJson, true); + var revertObj = MainPage.RequestHttps (API.GetSceneList, requestJson); if (revertObj.StateCode.ToUpper() == "SUCCESS") { sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SceneByRegion>> (revertObj.ResponseData.ToString ()); } @@ -503,7 +503,7 @@ public bool AddScene (SceneAndDeviceList sceneMark) { var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (sceneMark); - var revertObj = MainPage.RequestHttps (API.AddSceneAndDeviceList, requestJson, true); + var revertObj = MainPage.RequestHttps (API.AddSceneAndDeviceList, requestJson); if (revertObj.StateCode.ToUpper() == "SUCCESS") { //var requestAddDeviceObj = new BindDeviceToSceneItemObj () { SceneId = sceneId, Command = command, DeviceID = 0, DataString = dataString }; //var requestAddDeviceJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestAddDeviceObj); @@ -536,7 +536,7 @@ { var requestObj = new DeleteSceneObj () { Id = sceneId }; var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj); - var revertObj = MainPage.RequestHttps (API.DeleteScene, requestJson, true); + var revertObj = MainPage.RequestHttps (API.DeleteScene, requestJson); if (revertObj.StateCode.ToUpper() == "SUCCESS") { return true; } -- Gitblit v1.8.0