Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=80069 --- shadow/80069 2006-11-27 20:11:03.000000000 -0500 +++ shadow/80069.tmp.1700 2006-11-27 20:11:03.000000000 -0500 @@ -0,0 +1,61 @@ +Bug#: 80069 +Product: Mono: Class Libraries +Version: 1.2 +OS: +OS Details: tested in winxp +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: CORLIB +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: event isnt fired when CancelKey is pressed + +Please fill in this template when reporting a bug, unless you know what you +are doing. +Description of Problem: +CancelKeyPress is never called when cancel key is sent to a console +application. + +Steps to reproduce the problem: +1. Compile the program below and run it +2. Press Ctrl-C (the cancel key) + +Actual Results: +The application exits immediately + +Expected Results: +The applications prints "I hit the cancel key" then exits. + + +How often does this happen? +Every time + + + + class Program + { + private static bool exit = false; + static void Main() + { + Console.CancelKeyPress += new +ConsoleCancelEventHandler(Console_CancelKeyPress); + while (!exit) + { + Console.WriteLine("Hit the cancel key to exit"); + System.Threading.Thread.Sleep(1000); + } + } + + static void Console_CancelKeyPress(object sender, +ConsoleCancelEventArgs e) + { + Console.WriteLine("I hit the cancel key"); + exit = true; + } + } _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
