From e79b65b97a8ae1eae5ee172dea1b52d041006599 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 02 九月 2020 17:24:32 +0800
Subject: [PATCH] 2020-09-02-3
---
ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs | 58 ++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 48 insertions(+), 10 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs
index 4e4a511..34348bd 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs
@@ -50,7 +50,7 @@
//鍒濆鍖栦腑閮ㄤ俊鎭�
this.InitMiddleFrame(nowDirectory);
- this.BackButtonClickEvent += (btnContr) =>
+ this.BackButtonClickEvent = (btnContr) =>
{
string rootPath = Shared.IO.FileUtils.RootPath.Trim('/');
if (this.nowDirectory.Trim('/') == rootPath)
@@ -80,14 +80,14 @@
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)
@@ -97,7 +97,7 @@
}
listDirectory.Sort();
- listAllFile = HdlAutoBackupLogic.GetFileFromDirectory(directory.TrimEnd('/'));
+ listAllFile = HdlFileLogic.Current.GetFileFromDirectory(directory.TrimEnd('/'));
listAllFile.Sort();
}
@@ -131,6 +131,30 @@
}
}
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)
@@ -185,6 +209,20 @@
}
row1.frameTable.AddRightArrow();
+ 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(fileName, HdlFileLogic.Current.ReadFileByteContent(tagrtFile));
+ });
+ });
+ };
+
var btnDelete = row1.AddDeleteControl();
btnDelete.ButtonClickEvent += (sender, e) =>
{
--
Gitblit v1.8.0