mirror of
https://github.com/netchx/netch.git
synced 2026-03-26 18:49:46 +08:00
还原创建进程模式扫描目录的选择文件夹对话框
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.WindowsAPICodePack.Dialogs;
|
||||
using Netch.Utils;
|
||||
|
||||
namespace Netch.Forms.Mode
|
||||
@@ -171,10 +172,18 @@ namespace Netch.Forms.Mode
|
||||
|
||||
private void ScanButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dialog = new FolderBrowserDialog();
|
||||
if (dialog.ShowDialog(this) == DialogResult.OK)
|
||||
var dialog = new CommonOpenFileDialog
|
||||
{
|
||||
ScanDirectory(dialog.SelectedPath);
|
||||
IsFolderPicker = true,
|
||||
Multiselect = false,
|
||||
Title = i18N.Translate("Select a folder"),
|
||||
AddToMostRecentlyUsedList = false,
|
||||
EnsurePathExists = true,
|
||||
NavigateToShortcut = true
|
||||
};
|
||||
if (dialog.ShowDialog(Win32Native.GetForegroundWindow()) == CommonFileDialogResult.Ok)
|
||||
{
|
||||
ScanDirectory(dialog.FileName);
|
||||
MessageBoxX.Show(i18N.Translate("Scan completed"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="System.Collections.Immutable" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="System.Reflection.Metadata" Version="5.0.0-preview.8.20407.11" />
|
||||
<PackageReference Include="WindowsAPICodePack-Shell" Version="1.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -9,10 +9,17 @@ if %Configuration%==Release (
|
||||
%TargetDir%MaxMind.GeoIP2.dll ^
|
||||
%TargetDir%Microsoft.Diagnostics.FastSerialization.dll ^
|
||||
%TargetDir%Microsoft.Diagnostics.Tracing.TraceEvent.dll ^
|
||||
%TargetDir%Microsoft.WindowsAPICodePack.dll ^
|
||||
%TargetDir%Microsoft.WindowsAPICodePack.Shell.dll ^
|
||||
%TargetDir%NetchLib.dll ^
|
||||
%TargetDir%Newtonsoft.Json.dll ^
|
||||
%TargetDir%OSExtensions.dll ^
|
||||
%TargetDir%System.Buffers.dll ^
|
||||
%TargetDir%System.Collections.Immutable.dll ^
|
||||
%TargetDir%System.Memory.dll ^
|
||||
%TargetDir%System.Net.IPNetwork.dll ^
|
||||
%TargetDir%System.Numerics.Vectors.dll ^
|
||||
%TargetDir%System.Reflection.Metadata.dll ^
|
||||
%TargetDir%System.Runtime.CompilerServices.Unsafe.dll ^
|
||||
%TargetDir%TraceReloggerLib.dll
|
||||
|
||||
|
||||
Reference in New Issue
Block a user