old mode 100755
new mode 100644
| | |
| | |
|
| | | var btnButton = new NormalViewControl(200, 69, true);
|
| | | btnButton.Gravity = Gravity.CenterVertical;
|
| | | btnButton.X = bodyFrameLayout.Width - Application.GetRealWidth(200) - ControlCommonResourse.XXLeft;
|
| | | btnButton.X = bodyFrameLayout.Width - Application.GetRealWidth(200) - HdlControlResourse.XXLeft;
|
| | | btnButton.TextColor = UserCenterColor.Current.TopLayoutTitleText;
|
| | | btnButton.TextAlignment = TextAlignment.BottomRight;
|
| | | btnButton.TextSize = 17;
|
| | |
| | | //初始化中部信息
|
| | | this.InitMiddleFrame(nowDirectory);
|
| | |
|
| | | this.BackButtonClickEvent += (btnContr) =>
|
| | | this.BackButtonClickEvent = (btnContr) =>
|
| | | {
|
| | | string rootPath = Shared.IO.FileUtils.RootPath.Trim('/');
|
| | | if (this.nowDirectory.Trim('/') == rootPath)
|
| | |
| | | var listDirectory = new List<string>();
|
| | | var listAllFile = new List<string>();
|
| | |
|
| | | string rootPath = Shared.IO.FileUtils.RootPath.Trim('/');
|
| | | if (this.nowDirectory.Trim('/') == rootPath)
|
| | | {
|
| | | //根目录只要两个就可以了
|
| | | listDirectory.Add(Common.Config.Instance.Guid);
|
| | | listDirectory.Add(Application.Skin != null ? Application.Skin : "Phone");
|
| | | }
|
| | | else
|
| | | //string rootPath = Shared.IO.FileUtils.RootPath.Trim('/');
|
| | | //if (this.nowDirectory.Trim('/') == rootPath)
|
| | | //{
|
| | | // //根目录只要两个就可以了
|
| | | // listDirectory.Add(Common.Config.Instance.Guid);
|
| | | // listDirectory.Add(Application.Skin != null ? Application.Skin : "Phone");
|
| | | //}
|
| | | //else
|
| | | {
|
| | | var files = System.IO.Directory.GetDirectories(directory);
|
| | | foreach (var file in files)
|
| | |
| | | }
|
| | | listDirectory.Sort();
|
| | |
|
| | | listAllFile = HdlAutoBackupLogic.GetFileFromDirectory(directory.TrimEnd('/'));
|
| | | listAllFile = HdlFileLogic.Current.GetFileFromDirectory(directory.TrimEnd('/'));
|
| | | listAllFile.Sort();
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | | listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(50));
|
| | |
|
| | | var btnButon = new BottomClickButton();
|
| | | btnButon.Text = "删除文件夹";
|
| | | bodyFrameLayout.AddChidren(btnButon);
|
| | | btnButon.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | this.ShowMassage(ShowMsgType.Confirm, "是否清除该文件夹", () =>
|
| | | {
|
| | | try
|
| | | {
|
| | | System.IO.Directory.Delete(directory, true);
|
| | | this.CloseForm();
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | this.ShowMassage(ShowMsgType.Error, "清除缓存文件夹异常");
|
| | | HdlLogLogic.Current.WriteLog(ex, "清除缓存文件夹异常");
|
| | | }
|
| | | });
|
| | | };
|
| | | if (directory == Common.Config.Instance.FullPath)
|
| | | {
|
| | | btnButon.CanClick = false;
|
| | | }
|
| | | }
|
| | |
|
| | | private void AddDirectoryRowControl(VerticalListControl listView, string directoryName, string directory, bool addLine)
|
| | |
| | | {
|
| | | try
|
| | | {
|
| | | dirNewName = UserCenterLogic.DecryptPassword(UserCenterResourse.FileEncryptKey, directoryName);
|
| | | dirNewName = HdlCommonLogic.Current.DecryptPassword(HdlUserCenterResourse.FileEncryptKey, directoryName);
|
| | | }
|
| | | catch { dirNewName = directoryName; }
|
| | | }
|
| | |
| | | {
|
| | | try
|
| | | {
|
| | | fileNewName = UserCenterLogic.DecryptPassword(UserCenterResourse.FileEncryptKey, fileName);
|
| | | fileNewName = HdlCommonLogic.Current.DecryptPassword(HdlUserCenterResourse.FileEncryptKey, fileName);
|
| | | }
|
| | | catch { fileNewName = fileName; }
|
| | | }
|
| | |
| | | }
|
| | | row1.frameTable.AddRightArrow();
|
| | |
|
| | | var btnReName = row1.AddDeleteControl();
|
| | | btnReName.Text = "重命名";
|
| | | btnReName.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //生成一个弹窗画面
|
| | | var dialogForm = new DialogInputControl(360);
|
| | | //保存模板到App
|
| | | dialogForm.SetTitleText("重命名");
|
| | | //请输入新名字
|
| | | dialogForm.SetTipText("请输入新名字");
|
| | | dialogForm.Text = fileName;
|
| | |
|
| | | //按下确认按钮
|
| | | dialogForm.ComfirmClickEvent += ((textValue) =>
|
| | | {
|
| | | //画面关闭
|
| | | dialogForm.CloseDialog();
|
| | | if (textValue == string.Empty)
|
| | | {
|
| | | return;
|
| | | }
|
| | | HdlFileLogic.Current.MoveFile(System.IO.Path.Combine(directory, fileName), System.IO.Path.Combine(directory, textValue));
|
| | |
|
| | | fileNewName = textValue;
|
| | | fileName = textValue;
|
| | | btnName.Text = textValue;
|
| | | });
|
| | | };
|
| | |
|
| | | var btnUpLoad = row1.AddEditorControl();
|
| | | btnUpLoad.Text = "上传";
|
| | | btnUpLoad.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | this.ShowMassage(ShowMsgType.Confirm, "是否上传该文件(测试)?", () =>
|
| | | {
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | string tagrtFile = System.IO.Path.Combine(directory, fileName);
|
| | | HdlBackupLogic.Current.UpLoadByteDataToOptionBackup(fileNewName, HdlFileLogic.Current.ReadFileByteContent(tagrtFile));
|
| | | });
|
| | | });
|
| | | };
|
| | |
|
| | | var btnDelete = row1.AddDeleteControl();
|
| | | btnDelete.ButtonClickEvent += (sender, e) =>
|
| | | {
|