| | |
| | | {
|
| | | //不允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = false;
|
| | | UserCenterResourse.Option.AppCanSignout = false;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = false;
|
| | |
|
| | | //首先先创建一个临时文件夹,存在文件则清空
|
| | | string newDir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadBackupTempDirectory);
|
| | |
| | | ProgressFormBar.Current.Close();
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = true;
|
| | | return null;
|
| | | }
|
| | |
|
| | |
| | | ProgressFormBar.Current.Close();
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = true;
|
| | | return null;
|
| | | }
|
| | |
|
| | |
| | | ProgressFormBar.Current.Close();
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = true;
|
| | | return null;
|
| | | }
|
| | | //将输入写入本地的临时文件夹
|
| | |
| | | ProgressFormBar.Current.Close();
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = true;
|
| | |
|
| | | return newDir;
|
| | | }
|
| | |
| | |
|
| | | //不允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = false;
|
| | | UserCenterResourse.Option.AppCanSignout = false;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = false;
|
| | |
|
| | | //你说为什么这里不分一个函数出来(理论上是分函数出来的)
|
| | | //是因为如果分函数的话,会出现双重异步,导致主线程的进度条的百分比永远定死0%
|
| | |
| | | ProgressFormBar.Current.Close();
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = true;
|
| | | return false;
|
| | | }
|
| | | //判断是否是应该上传的文件
|
| | |
| | | ProgressFormBar.Current.Close();
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = true;
|
| | | return false;
|
| | | }
|
| | | //设置进度值
|
| | |
| | | ProgressFormBar.Current.Close();
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = true;
|
| | | return false;
|
| | | }
|
| | |
|
| | |
| | | ProgressFormBar.Current.Close();
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = true;
|
| | | return false;
|
| | | }
|
| | | //设置进度值
|
| | |
| | | ProgressFormBar.Current.Close();
|
| | | //允许按系统的返回键
|
| | | Shared.Common.CommonPage.BackKeyCanClick = true;
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | | UserCenterResourse.AccountOption.AppCanSignout = true;
|
| | |
|
| | | return true;
|
| | | }
|
| | |
| | | nvc.Add("HomeId", Shared.Common.Config.Instance.Home.Id);
|
| | | nvc.Add("BackupClassId", BackupClassId);
|
| | | nvc.Add("ManualBackupType", ManualBackupType.ToString());
|
| | | nvc.Add("IsOtherAccountCtrl", Common.Config.Instance.isAdministrator.ToString());
|
| | | nvc.Add("IsOtherAccountCtrl", Common.Config.Instance.Home.IsOthreShare.ToString());
|
| | |
|
| | | string base64 = GetBase64Text(fullName);
|
| | | nvc.Add("UploadSubFileLists[0].BackupFileName", fileName);
|
| | |
| | | string contentType = "application/octet-stream";
|
| | | string requestUrl = string.Empty;
|
| | | //启用管理员权限
|
| | | if (Config.Instance.isAdministrator == true)
|
| | | if (Config.Instance.Home.IsOthreShare == true)
|
| | | {
|
| | | requestUrl = $"{Config.Instance.AdminRequestBaseUrl}/{RequestName}";
|
| | | }
|
| | |
| | | IMessageCommon.Current.IgnoreError = false;
|
| | | return false;
|
| | | }
|
| | | if (listFile.Count == 0)
|
| | | {
|
| | | //恢复
|
| | | IMessageCommon.Current.IgnoreError = false;
|
| | | return true;
|
| | | }
|
| | |
|
| | | //检测
|
| | | string checkKeys = UserCenterLogic.EncryptPassword(UserCenterResourse.FileEncryptKey, DirNameResourse.ShowOptionMenuFile + UserCenterResourse.UserInfo.Account);
|
| | |
| | | //出力详细Log(Debug用)
|
| | | UserCenterResourse.HideOption.DetailedLog = 1;
|
| | | }
|
| | | checkKeys = UserCenterLogic.EncryptPassword(UserCenterResourse.FileEncryptKey, DirNameResourse.DeviceHistoryFile + UserCenterResourse.UserInfo.Account);
|
| | | if (listFile.Contains(checkKeys) == true)
|
| | | {
|
| | | //显示设备历史版本(Debug用)
|
| | | UserCenterResourse.HideOption.DeviceHistory = 1;
|
| | | }
|
| | |
|
| | | //恢复
|
| | | IMessageCommon.Current.IgnoreError = false;
|