Skip to content

Commit d2abc9f

Browse files
committed
[FlashpointManager] Remove loose folders after uninstalling Flashpoint
1 parent e14aba1 commit d2abc9f

3 files changed

Lines changed: 51 additions & 42 deletions

File tree

FlashpointManager/src/Forms/Main.Designer.cs

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

FlashpointManager/src/Forms/Main.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private void UpdateButton_Click(object sender, EventArgs e)
127127
new Operate().ShowDialog();
128128
}
129129

130-
private async void RemoveButton_Click(object sender, EventArgs e)
130+
private async void UninstallButton_Click(object sender, EventArgs e)
131131
{
132132
TabControl.Enabled = false;
133133

@@ -154,6 +154,15 @@ await Task.Run(() => {
154154
"Uninstallation Complete", MessageBoxButtons.OK, MessageBoxIcon.Information
155155
);
156156

157+
new Process() { StartInfo = {
158+
FileName = "cmd.exe",
159+
Arguments = "/k timeout /nobreak /t 1 >nul & " +
160+
$"rmdir /Q \"{Path.GetFullPath(Path.Combine(FPM.SourcePath, "Manager"))}\" & " +
161+
$"rmdir /Q \"{Path.GetFullPath(FPM.SourcePath)}\" & exit",
162+
WorkingDirectory = Path.GetFullPath(Path.Combine(FPM.SourcePath, "..")),
163+
WindowStyle = ProcessWindowStyle.Hidden
164+
}}.Start();
165+
157166
Close();
158167
}
159168

FlashpointManager/src/Forms/Main.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
<resheader name="writer">
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120-
<data name="RemoveDescription.Text" xml:space="preserve">
120+
<data name="UninstallDescription.Text" xml:space="preserve">
121121
<value>You can uninstall Flashpoint by clicking the button below. Note that the operation cannot be cancelled.
122122

123123
Uninstalling Flashpoint will not delete save data, but it will delete your favorites and any custom playlists.</value>

0 commit comments

Comments
 (0)