ef3735764a
Versioning scheme: MAJOR.MINOR.PATCH where MAJOR matches the wire protocol version (no cross-major compat), MINOR is the main change indicator, PATCH generally unused. - gatunad: Cargo.toml version 2.0.0 (clap --version picks it up) - gatuna: csproj Version 2.0.0, shown in form title + tray tooltip - app.manifest: assemblyIdentity version 2.0.0.0 - Frame version rejection already in place (both sides reject != 2) - README: document versioning scheme
44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
namespace gatuna;
|
|
|
|
static class Program
|
|
{
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
ApplicationConfiguration.Initialize();
|
|
|
|
var form = new MainForm();
|
|
|
|
var ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version!;
|
|
|
|
using var tray = new NotifyIcon
|
|
{
|
|
Icon = SystemIcons.GetStockIcon(StockIconId.NetworkConnect, 32),
|
|
Text = $"gatuna {ver.Major}.{ver.Minor}",
|
|
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);
|
|
}
|
|
}
|