Skip to content

Commit

Permalink
bug fix and added exception text for errors
Browse files Browse the repository at this point in the history
still have some bugs, i ll fix later
  • Loading branch information
lckt0 authored Nov 5, 2021
1 parent a5a314d commit 4a62467
Show file tree
Hide file tree
Showing 7 changed files with 38,764 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private void btnStart_Click(object sender, EventArgs e)
if (file.ToLower().EndsWith(".exe"))
{
string newname = file.Substring(0, file.Length - 4) + "-astro.exe";
if (newname.Contains(oldValue))
if (newname.Contains(oldValue) && fileBool)
{
newname = newname.Replace(oldValue, newValue);
}
Expand All @@ -82,7 +82,7 @@ private void btnStart_Click(object sender, EventArgs e)
if (file.ToLower().EndsWith(".dll"))
{
string newname = file.Substring(0, file.Length - 4) + "-astro.dll";
if (newname.Contains(oldValue))
if (newname.Contains(oldValue) && fileBool)
{
newname = newname.Replace(oldValue, newValue);
}
Expand All @@ -106,9 +106,9 @@ private void btnStart_Click(object sender, EventArgs e)
MessageBox.Show("Rename process is successfully completed!\nRenamed Things: " + countx, "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch
catch (Exception a)
{
MessageBox.Show("An error occured while saving file!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show($"An error occured while saving file!\nException: {a.Message.ToString()}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

processProgress.Value = 0;
Expand Down
Binary file added src/bin/Debug/Astro Renamer.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions src/bin/Debug/Astro Renamer.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
Binary file added src/bin/Debug/Astro Renamer.pdb
Binary file not shown.
Binary file added src/bin/Debug/dnlib.dll
Binary file not shown.
38,754 changes: 38,754 additions & 0 deletions src/bin/Debug/dnlib.xml

Large diffs are not rendered by default.

Binary file not shown.

0 comments on commit 4a62467

Please sign in to comment.