| | |
| | | }); |
| | | } |
| | | } catch (Exception ex) { |
| | | Console.WriteLine (ex.Message); |
| | | Utlis.WriteLine (ex.Message); |
| | | } finally { |
| | | Application.RunOnMainThread (() => { |
| | | MainPage.Loading.Hide (); |
| | |
| | | ItemButton.MouseUpEventHandler += (sender, e) => { |
| | | Action action = () => { |
| | | Application.RunOnMainThread (() => { |
| | | MainPage.Loading.Start ("please wait..."); |
| | | MainPage.Loading.Start ("Please wait..."); |
| | | }); |
| | | System.Threading.Tasks.Task.Run (() => { |
| | | try { |
| | |
| | | InitDevcieRow (alexaDeviceLista, bodyView); |
| | | }); |
| | | } catch (Exception ex) { |
| | | Console.WriteLine (ex.Message); |
| | | Utlis.WriteLine (ex.Message); |
| | | } finally { |
| | | Application.RunOnMainThread (() => { |
| | | MainPage.Loading.Hide (); |
| | |
| | | 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))); |
| | |
| | | |
| | | if (!roomDeviceFilePathList.Contains (oldDevicePath)) { |
| | | DelDevice (oldDevice.Id); |
| | | Console.WriteLine ("delDevice " + oldDevice.DeviceName); |
| | | Utlis.WriteLine ("delDevice " + oldDevice.DeviceName); |
| | | } |
| | | } |
| | | |
| | |
| | | }); |
| | | |
| | | } catch (Exception ex) { |
| | | Console.WriteLine (ex.Message); |
| | | Utlis.WriteLine (ex.Message); |
| | | } finally { |
| | | Application.RunOnMainThread (() => { |
| | | MainPage.Loading.Hide (); |
| | |
| | | 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) {//特殊处理服务器与本地设备类型不一样的设备 |
| | |
| | | userDeviceListPage.ShowPage (action, saveAction); |
| | | }); |
| | | } catch (Exception ex) { |
| | | Console.WriteLine (ex.Message); |
| | | Utlis.WriteLine (ex.Message); |
| | | } finally { |
| | | Application.RunOnMainThread (() => { |
| | | MainPage.Loading.Hide (); |