Skip to content
This repository was archived by the owner on Nov 14, 2024. It is now read-only.

Commit 8ed762f

Browse files
committed
解压zip;可以右键标签页分屏、移动到新窗口
1 parent 7fbeec5 commit 8ed762f

35 files changed

Lines changed: 954 additions & 169 deletions
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

ExplorerEx/Command/FileItemCommand.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ public async void Execute(object param) {
186186
OpenFileWith(item, Settings.Instance.TextEditor);
187187
}
188188
break;
189+
case "Unzip":
190+
foreach (var item in Items.Where(i => i is FileItem { IsZip: true })) {
191+
ExtractZipWindow.Show(item.FullPath);
192+
}
193+
break;
189194
}
190195
}
191196

@@ -209,7 +214,8 @@ public static void OpenFile(FileListViewItem item, bool runAs) {
209214
});
210215
switch (result) {
211216
case MessageBoxResult.Yes:
212-
break;
217+
ExtractZipWindow.Show(zipFile.ZipPath);
218+
return;
213219
case MessageBoxResult.No:
214220
break;
215221
default:

ExplorerEx/Model/FileItem/FileSystemItem.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ public class FileItem : FileSystemItem {
8585
/// </summary>
8686
public bool IsEditable => FullPath[^4..] is ".txt" or ".log" or ".ini" or ".inf" or ".cmd" or ".bat" or ".ps1";
8787

88+
public bool IsZip => FullPath[^4..] == ".zip";
89+
8890
/// <summary>
8991
/// 是否为.lnk文件
9092
/// </summary>

ExplorerEx/Strings/Resources.Designer.cs

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ExplorerEx/Strings/Resources.en.resx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,4 +422,25 @@ For the application to run properly, it's recommanded that you first extract all
422422
<data name="CloseWindow" xml:space="preserve">
423423
<value>Close window</value>
424424
</data>
425+
<data name="#SelectADestinationAndExtractFiles" xml:space="preserve">
426+
<value>Select a Destination and Extract Files</value>
427+
</data>
428+
<data name="#FilesWillBeExtractedToThisFolder" xml:space="preserve">
429+
<value>Files will be extracted to this folder:</value>
430+
</data>
431+
<data name="Browse..." xml:space="preserve">
432+
<value>Browse...</value>
433+
</data>
434+
<data name="#ShowExtractedFilesWhenComplete" xml:space="preserve">
435+
<value>Show extracted files when complete</value>
436+
</data>
437+
<data name="Extract" xml:space="preserve">
438+
<value>Extract</value>
439+
</data>
440+
<data name="#ErrorExtractFiles" xml:space="preserve">
441+
<value>解压下列文件时发生错误:</value>
442+
</data>
443+
<data name="And...More" xml:space="preserve">
444+
<value>还有 {0} 个。</value>
445+
</data>
425446
</root>

ExplorerEx/Strings/Resources.resx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,4 +469,25 @@ ExplorerEx [-h|--help] [-r|--runInBackground] [-o|--openInNewWindow] [-d|--requi
469469
<data name="CloseWindow" xml:space="preserve">
470470
<value>关闭窗口</value>
471471
</data>
472+
<data name="#SelectADestinationAndExtractFiles" xml:space="preserve">
473+
<value>选择要解压到的位置</value>
474+
</data>
475+
<data name="#FilesWillBeExtractedToThisFolder" xml:space="preserve">
476+
<value>文件会被解压到这个文件夹:</value>
477+
</data>
478+
<data name="Browse..." xml:space="preserve">
479+
<value>浏览……</value>
480+
</data>
481+
<data name="#ShowExtractedFilesWhenComplete" xml:space="preserve">
482+
<value>解压完成后打开文件夹</value>
483+
</data>
484+
<data name="Extract" xml:space="preserve">
485+
<value>解压缩</value>
486+
</data>
487+
<data name="#ErrorExtractFiles" xml:space="preserve">
488+
<value>Error occurs when extracting following files:</value>
489+
</data>
490+
<data name="And...More" xml:space="preserve">
491+
<value>And {0} more.</value>
492+
</data>
472493
</root>

ExplorerEx/View/Controls/AddressBar.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
using System.IO;
44
using System.Windows;
55
using System.Windows.Controls;
6-
using System.Windows.Controls.Primitives;
76
using System.Windows.Input;
87
using ExplorerEx.Command;
98
using ExplorerEx.Model;
109
using ExplorerEx.Utils;
11-
using HandyControl.Tools;
1210

1311
namespace ExplorerEx.View.Controls;
1412

0 commit comments

Comments
 (0)