Skip to content

Commit bffe8a2

Browse files
authored
Merge pull request #9 from btwise/master
拖拽方式添加无法在预览列表里选择
2 parents 9c722a1 + 08260f2 commit bffe8a2

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

PDFQFZ/Form1.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,17 @@ private void pathText_DragDrop(object sender, DragEventArgs e)
969969
{
970970
this.pathText.Text = filePaths[0];
971971
this.textBCpath.Text = filePaths[0] + "\\QFZ";
972+
dt.Rows.Clear();
973+
dt.Rows.Add(new object[] { "", "" });
974+
DirectoryInfo dir = new DirectoryInfo(pathText.Text);
975+
var fileInfos = dir.GetFiles();
976+
foreach (var fileInfo in fileInfos)
977+
{
978+
if (fileInfo.Extension == ".pdf")
979+
{
980+
dt.Rows.Add(new object[] { fileInfo.Name, fileInfo.FullName });
981+
}
982+
}
972983
}
973984
else
974985
{
@@ -988,6 +999,14 @@ private void pathText_DragDrop(object sender, DragEventArgs e)
988999
pdfPaths = pdfPaths.Substring(0, pdfPaths.Length - 1);
9891000
this.pathText.Text = pdfPaths;
9901001
this.textBCpath.Text = System.IO.Path.GetDirectoryName(filePaths[0]);
1002+
dt.Rows.Clear();
1003+
dt.Rows.Add(new object[] { "", "" });
1004+
foreach (string filePath in filePaths)
1005+
{
1006+
string filename = System.IO.Path.GetFileName(filePath.ToString());//文件名
1007+
dt.Rows.Add(new object[] { filename, filePath });
1008+
}
1009+
9911010
}
9921011
}
9931012

PDFQFZ/PDFQFZ.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<GenerateManifests>true</GenerateManifests>
6363
</PropertyGroup>
6464
<PropertyGroup>
65-
<SignManifests>true</SignManifests>
65+
<SignManifests>false</SignManifests>
6666
</PropertyGroup>
6767
<PropertyGroup>
6868
<TargetZone>LocalIntranet</TargetZone>

0 commit comments

Comments
 (0)