private void MainFormFormClosing1(object sender, FormClosingEventArgs e)
{
if (e.CloseReason != CloseReason.WindowsShutDown)
{
if (Conf.MinimiseOnClose && !ShuttingDown)
{
e.Cancel = true;
WindowState = FormWindowState.Minimized;
return;
}
}
ShuttingDown = true;
if (_mIcp != null && _mCookie != -1)
{
try
{
_mIcp.Unadvise(_mCookie);
}
catch
{
// ignored
}
}
Exit();
}