| | |
| | | //文件夹
|
| | | string strDir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory);
|
| | |
|
| | | //不允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = false;
|
| | | UserCenterResourse.Option.AppCanSignout = false;
|
| | |
|
| | | foreach (string keys in listDistributedMark)
|
| | | {
|
| | | var dataPra = new { DistributedMark = keys, HouseDistributedMark = Common.Config.Instance.Home.Id, IsOtherAccountControl = Common.Config.Instance.isAdministrator };
|
| | | var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetOneShareData", false, dataPra);
|
| | | if (result == null)
|
| | | {
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | | return null;
|
| | | }
|
| | | var dataResult = Newtonsoft.Json.JsonConvert.DeserializeObject<GetShardInfoResult>(result);
|
| | |
| | | //设置进度值
|
| | | ProgressBar.SetValue(1);
|
| | | }
|
| | |
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | |
|
| | | return listFile;
|
| | | }
|
| | |
| | | /// <summary>
|
| | | /// 获取本地全部的共享文件
|
| | | /// </summary>
|
| | | /// <param name="room">指定只获取指定房间的</param>
|
| | | /// <returns></returns>
|
| | | public List<string> GetLocalAllShardFile(Common.Room room = null)
|
| | | public List<string> GetLocalAllShardFile()
|
| | | {
|
| | | string path = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory);
|
| | | var listFile = HdlAutoBackupLogic.GetFileFromDirectory(path);
|
| | | if (room == null)
|
| | |
|
| | | return listFile;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 文件是否存在
|
| | | /// </summary>
|
| | | /// <param name="fileName"></param>
|
| | | /// <returns></returns>
|
| | | public bool IsFileExists(string fileName)
|
| | | {
|
| | | string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, fileName);
|
| | | if (System.IO.File.Exists(fullName) == false)
|
| | | {
|
| | | return listFile;
|
| | | return false;
|
| | | }
|
| | | //房间
|
| | | var listRoomFile = new List<string>() { room.FileName };
|
| | | //场景文件
|
| | | listRoomFile.AddRange(room.SceneUIFilePathList);
|
| | | //设备文件
|
| | | foreach (var uiName in room.DeviceUIFilePathList)
|
| | | {
|
| | | string deviceName = uiName.Replace("DeviceUI_", string.Empty);
|
| | | listRoomFile.Add(deviceName);
|
| | | }
|
| | | return null;
|
| | | return true;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | //获取上传的文件,然后将文件复制到指定文件夹
|
| | | var listFile = this.GetUploadListFile(ref roomTemp, listDevice, listScene, listChirdDevice, listChirdScene);
|
| | |
|
| | | //不允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = false;
|
| | | UserCenterResourse.Option.AppCanSignout = false;
|
| | |
|
| | | //打开进度条
|
| | | ProgressBar.Show();
|
| | | //设置最大值
|
| | |
| | | //关闭进度条
|
| | | ProgressBar.Close();
|
| | |
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | |
|
| | | if (result == false)
|
| | | {
|
| | | //恢复原数据
|