FormMain( Services.PsSettings setting, Services.PacServer pacServer, Services.ServerTracker servTracker) { this.setting = setting; this.pacServer = pacServer; this.servTracker = servTracker; this.FormClosing += (s, a) => { var confirm = true; if (!setting.IsClosing() && !this.formVGCPluginCtrl.IsOptionsSaved()) { confirm = VgcApis.Misc.UI.Confirm(I18N.ConfirmCloseWinWithoutSave); } if (confirm) { ReleaseUpdateTimer(); formVGCPluginCtrl.Cleanup(); } else { a.Cancel = true; } }; InitializeComponent(); }