static void Main()
{
// Do this before Composer.Init() because of the Disabled setting
Settings.LoadConfig();
Composer.Init();
Settings.LoadSequences();
KeyboardHook.Init();
Updater.Init();
Settings.StartWatchConfigFile();
try
{
var app = new Application();
var icon = new SysTrayIcon();
app.Exit += (o, e) => icon.Dispose();
app.Run();
}
finally
{
Settings.StopWatchConfigFile();
Updater.Fini();
KeyboardHook.Fini();
Settings.SaveConfig();
Composer.Fini();
Updater.Fini();
}
}