Files
gatuna/gatuna-win/Program.cs
T
mute 2f61f2bb1b move win/gatuna-client to gatuna-win, rename project to gatuna
- Directory: win/gatuna-client/ -> gatuna-win/
- Project file: gatuna-client.csproj -> gatuna.csproj
- Assembly name: gatuna-client -> gatuna
- Root namespace: gatuna_client -> gatuna
- All .cs files: namespace gatuna_client -> gatuna
- app.manifest: assemblyIdentity name -> gatuna
- README: updated all paths and references
2026-08-13 08:43:11 +00:00

42 lines
1018 B
C#

namespace gatuna;
static class Program
{
[STAThread]
static void Main()
{
ApplicationConfiguration.Initialize();
var form = new MainForm();
using var tray = new NotifyIcon
{
Icon = SystemIcons.GetStockIcon(StockIconId.NetworkConnect, 32),
Text = "gatuna",
Visible = true,
};
tray.ContextMenuStrip = new ContextMenuStrip();
tray.ContextMenuStrip.Items.Add("Show", null, (_, _) =>
{
form.Show();
form.WindowState = FormWindowState.Normal;
form.Activate();
});
tray.ContextMenuStrip.Items.Add("-");
tray.ContextMenuStrip.Items.Add("Exit", null, (_, _) =>
{
tray.Visible = false;
form.Close();
});
tray.DoubleClick += (_, _) =>
{
form.Show();
form.WindowState = FormWindowState.Normal;
form.Activate();
};
Application.Run(form);
}
}