Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
输出到新位置时,对不同文件夹内的同名文件做重命名
  • Loading branch information
lucifersun committed Aug 3, 2019
1 parent 71aaaaa commit 80aefe2
Show file tree
Hide file tree
Showing 25 changed files with 24 additions and 10 deletions.
Binary file modified .vs/ImageOptimize/v16/.suo
Binary file not shown.
Binary file modified .vs/ImageOptimize/v16/Server/sqlite3/storage.ide
Binary file not shown.
Binary file not shown.
Binary file not shown.
14 changes: 14 additions & 0 deletions ImageOptimize/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,20 @@ private void Button_Click(object sender, RoutedEventArgs e)
//如果选择使用新文件夹
if (radioButton1.IsChecked==true)
{
//检查文件名是否有重复,避免不同文件夹内有同名文件
string tempFileName = null;
for(int i = 0; i<Fileslist.SrcName.Count; i++)
{
tempFileName = Fileslist.SrcName[i];
Fileslist.SrcName[i] = "";
if (Fileslist.SrcName.Contains(tempFileName))
{
tempFileName = System.IO.Path.GetFileNameWithoutExtension(tempFileName) + "_"+i.ToString() + System.IO.Path.GetExtension(Fileslist.SrcPath[i]);
}
Fileslist.SrcName[i] = tempFileName;
}


string NewFold = newfoldBox.Text;
string preFileName = PrefixFileName.Text;
Parallel.For(0, Fileslist.SrcName.Count, i => Fileslist.NewPath[i] = NewFold + "\\" + preFileName + Fileslist.SrcName[i]);
Expand Down
2 changes: 1 addition & 1 deletion ImageOptimize/bin/Debug/ImageOptimize.application
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>iouFMuH5PvRSQovus1p4WE4+8w0BRCWErOk7nVvN6Aw=</dsig:DigestValue>
<dsig:DigestValue>mnXc6lTxSKCwTLl074yqPBIn6wVMZye3JvosTZvr+Ao=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified ImageOptimize/bin/Debug/ImageOptimize.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion ImageOptimize/bin/Debug/ImageOptimize.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>Vkr0xfPejJ4z2R1iAAFo4vaiqmZYmogPz2fItbhwKxc=</dsig:DigestValue>
<dsig:DigestValue>X0+NpTZThrbWOlPlPAPo5v07NUc5CrbNa0XmTR053cg=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified ImageOptimize/bin/Debug/ImageOptimize.pdb
Binary file not shown.
Binary file modified ImageOptimize/bin/Debug/app.publish/ImageOptimize.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion ImageOptimize/bin/Release/ImageOptimize.application
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>aHOrelHeQylZIQhBV/YUuTvwmub6Jvpw87DZ85vJZGc=</dsig:DigestValue>
<dsig:DigestValue>vvxkQb+V7HEM/XOwJ2an/QvyCCxM8sO1NDXDon7SJZ0=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified ImageOptimize/bin/Release/ImageOptimize.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions ImageOptimize/bin/Release/ImageOptimize.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ImageOptimize.exe" size="167352">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ImageOptimize.exe" size="167864">
<assemblyIdentity name="ImageOptimize" version="1.0.0.0" language="neutral" processorArchitecture="amd64" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>YpocwsGhbh3caiPQM0jjlqgHTQeoCgJbHzfUs4pbnxE=</dsig:DigestValue>
<dsig:DigestValue>mg/ijYr7RN2mwnysEpASKfi69wGepl3TAmwj95xWiX4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified ImageOptimize/bin/Release/ImageOptimize.pdb
Binary file not shown.
Binary file modified ImageOptimize/bin/Release/app.publish/ImageOptimize.exe
Binary file not shown.
Binary file modified ImageOptimize/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Binary file not shown.
2 changes: 1 addition & 1 deletion ImageOptimize/obj/Debug/ImageOptimize.application
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>iouFMuH5PvRSQovus1p4WE4+8w0BRCWErOk7nVvN6Aw=</dsig:DigestValue>
<dsig:DigestValue>mnXc6lTxSKCwTLl074yqPBIn6wVMZye3JvosTZvr+Ao=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file not shown.
Binary file modified ImageOptimize/obj/Debug/ImageOptimize.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion ImageOptimize/obj/Debug/ImageOptimize.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>Vkr0xfPejJ4z2R1iAAFo4vaiqmZYmogPz2fItbhwKxc=</dsig:DigestValue>
<dsig:DigestValue>X0+NpTZThrbWOlPlPAPo5v07NUc5CrbNa0XmTR053cg=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified ImageOptimize/obj/Debug/ImageOptimize.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion ImageOptimize/obj/Release/ImageOptimize.application
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>aHOrelHeQylZIQhBV/YUuTvwmub6Jvpw87DZ85vJZGc=</dsig:DigestValue>
<dsig:DigestValue>vvxkQb+V7HEM/XOwJ2an/QvyCCxM8sO1NDXDon7SJZ0=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified ImageOptimize/obj/Release/ImageOptimize.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions ImageOptimize/obj/Release/ImageOptimize.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ImageOptimize.exe" size="167352">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ImageOptimize.exe" size="167864">
<assemblyIdentity name="ImageOptimize" version="1.0.0.0" language="neutral" processorArchitecture="amd64" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>YpocwsGhbh3caiPQM0jjlqgHTQeoCgJbHzfUs4pbnxE=</dsig:DigestValue>
<dsig:DigestValue>mg/ijYr7RN2mwnysEpASKfi69wGepl3TAmwj95xWiX4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified ImageOptimize/obj/Release/ImageOptimize.pdb
Binary file not shown.

0 comments on commit 80aefe2

Please sign in to comment.