Console.WriteLine("OnSessionEnding");
Console.WriteLine("OnSessionEnding");
Console.WriteLine("OnSessionEnding");
Console.WriteLine("OnSessionEnding");
Console.WriteLine("OnSessionEnding");
Console.WriteLine("OnSessionEnding");
Console.WriteLine("OnSessionEnding");
Console.WriteLine("OnSessionEnding");
MessageBoxResult result =
MessageBox.Show("Do you want to save your data?",
MainWindow.Title,
MessageBoxButton.YesNoCancel,
MessageBoxImage.Question,
MessageBoxResult.Yes);
args.Cancel = (result == MessageBoxResult.Cancel);
}
///
I put Console.WriteLine to see if the handler is
called, but the console (Petzold advised to compile
as console application to see trace, so) doesn't
show any message when I'm about to log-off.
I check messages that I put on OnStartUp.
I did first start from the ide and also start it
standalone by clicking built binary. I should miss
something, but the code is what I downloaded from
the publisher site.
It's very simple code and I''m embarrassed. How can
I check if SessionEnding event is correctly sent to
the application?
TIA
--
DwYoon