From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs | 61 ++++++++++++++++++++++++++++-- 1 files changed, 57 insertions(+), 4 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs old mode 100755 new mode 100644 index 401554a..4a55e41 --- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs @@ -31,7 +31,7 @@ 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; @@ -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) @@ -140,7 +164,7 @@ { try { - dirNewName = UserCenterLogic.DecryptPassword(UserCenterResourse.FileEncryptKey, directoryName); + dirNewName = HdlCommonLogic.Current.DecryptPassword(HdlUserCenterResourse.FileEncryptKey, directoryName); } catch { dirNewName = directoryName; } } @@ -170,7 +194,7 @@ { try { - fileNewName = UserCenterLogic.DecryptPassword(UserCenterResourse.FileEncryptKey, fileName); + fileNewName = HdlCommonLogic.Current.DecryptPassword(HdlUserCenterResourse.FileEncryptKey, fileName); } catch { fileNewName = fileName; } } @@ -185,6 +209,35 @@ } row1.frameTable.AddRightArrow(); + var btnReName = row1.AddDeleteControl(); + btnReName.Text = "閲嶅懡鍚�"; + btnReName.ButtonClickEvent += (sender, e) => + { + //鐢熸垚涓�涓脊绐楃敾闈� + var dialogForm = new DialogInputControl(360); + //淇濆瓨妯℃澘鍒癆pp + 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) => @@ -194,7 +247,7 @@ HdlThreadLogic.Current.RunThread(() => { string tagrtFile = System.IO.Path.Combine(directory, fileName); - HdlBackupLogic.Current.UpLoadByteDataToOptionBackup(fileName, HdlFileLogic.Current.ReadFileByteContent(tagrtFile)); + HdlBackupLogic.Current.UpLoadByteDataToOptionBackup(fileNewName, HdlFileLogic.Current.ReadFileByteContent(tagrtFile)); }); }); }; -- Gitblit v1.8.0