Skip to content

Commit

Permalink
feat: Quit on context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Marconi Gomes committed Sep 10, 2023
1 parent ac0121c commit 37a5c3b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AMRPC WatchDog Desktop/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace AMRPC_WatchDog_Desktop
internal static class Program
{

private const string AppVersion = "v0.2.0";
private const string AppVersion = "v0.2.1";
[STAThread]
private static void Main()
{
Expand Down
5 changes: 5 additions & 0 deletions AMRPC WatchDog Desktop/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public partial class Window : Form
private static readonly RegistryKey AppDataRegKey = Application.UserAppDataRegistry;
private static readonly object StartsMinimized = AppDataRegKey.GetValue(StartMinimizedValue);
private readonly bool _startsMinimizedBool = (string) StartsMinimized == "True";

private NotifyIcon _notifyIcon;

public Window(string appVersion)
Expand All @@ -25,6 +26,10 @@ public Window(string appVersion)
private void SetupNotifyIcon(string appVersion)
{
_notifyIcon.Text = $"AMRPC WatchDog {appVersion}";
_notifyIcon.ContextMenu = new ContextMenu(new MenuItem[]
{
new MenuItem("Quit", (_, __) => Application.Exit())
});
}

private void SetupAutostartCheckbox()
Expand Down
6 changes: 4 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Go to the [releases page](https://github.com/zephraOSS/AMRPC-WatchDog/releases/t
- [x] Build the websocket service to export Windows playing info on a websocket
- [x] Build the desktop version
- [x] Fix the fail to reconnect websocket when watchdog keeps running but connection is closed
- [ ] Fix triple websocket messages bug on song info changed
- [x] Add "Autostart with system" option
- [x] Add "Start minimized" option
- [x] Add "Start minimized" option
- [x] Add "Quit" to context menu on notify icon
- [ ] Fix triple websocket messages bug on song info changed
- [ ] Fix thumbnailPath null value

0 comments on commit 37a5c3b

Please sign in to comment.