private void OnWindowClosing(object sender, CancelEventArgs e)
{
if (CairoMessage.ShowOkCancel("You will need to reboot or use the start menu shortcut in order to run Cairo again.", "Are you sure you want to exit Cairo?", "Resources/cairoIcon.png", "Exit Cairo", "Cancel") == true)
{
//SHAppBarMessageHelper.DeRegisterBar(handle);
System.Drawing.Size size = new System.Drawing.Size((int)this.ActualWidth, (int)this.ActualHeight);
SHAppBarMessageHelper.RegisterBar(handle, size);
SysTray.DestroySystemTray();
Application.Current.Shutdown();
}
else
{
e.Cancel = true;
}
}