Skip to content

Commit

Permalink
Add success dialogs to service stop and uninstall
Browse files Browse the repository at this point in the history
Fixes #45
  • Loading branch information
Sparronator9999 committed Jan 17, 2025
1 parent 5e45ff6 commit 7455b41
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions YAMDCC.ConfigEditor/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ private void tsiStopSvc_Click(object sender, EventArgs e)
Utils.ShowError(Strings.GetString("dlgSvcStopErr"));
return false;
}
Utils.ShowInfo(Strings.GetString("dlgSvcStopped"), "Success");
return true;
});
dlg.ShowDialog();
Expand Down Expand Up @@ -594,6 +595,7 @@ private void tsiUninstall_Click(object sender, EventArgs e)
{
Directory.Delete(Paths.Data, true);
}
Utils.ShowInfo(Strings.GetString("dlgSvcUninstalled"), "Success");
return true;
}
Utils.ShowError(Strings.GetString("dlgUninstallErr"));
Expand Down
2 changes: 1 addition & 1 deletion YAMDCC.ConfigEditor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private static void Main()
if (status == ServiceControllerStatus.Stopped)
{
if (Utils.ShowInfo(
Strings.GetString("dlgSvcStopped"), "Service not running",
Strings.GetString("dlgSvcNotRunning"), "Service not running",
MessageBoxButtons.YesNo) == DialogResult.Yes)
{
ProgressDialog<bool> dlg = new(Strings.GetString("dlgSvcStarting"), () =>
Expand Down
8 changes: 7 additions & 1 deletion YAMDCC.ConfigEditor/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Re-download/re-install YAMDCC to fix this.</value>
Would you like to install it now?
(Clicking "No" will quit the program.)</value>
</data>
<data name="dlgSvcStopped" xml:space="preserve">
<data name="dlgSvcNotRunning" xml:space="preserve">
<value>The YAMDCC service is currently not running.
Would you like to start it now?
(Clicking "No" will quit the program.)</value>
Expand Down Expand Up @@ -417,4 +417,10 @@ Enable advanced settings anyway?</value>
<value>Click to toggle whether advanced settings can be adjusted.
NOTE: these settings should be left on the default value unless you know what you're doing.</value>
</data>
<data name="dlgSvcStopped" xml:space="preserve">
<value>The YAMDCC service was stopped sucessfully.</value>
</data>
<data name="dlgSvcUninstalled" xml:space="preserve">
<value>The YAMDCC service was uninstalled sucessfully.</value>
</data>
</root>

0 comments on commit 7455b41

Please sign in to comment.