// This method handles the ThresholdExceeded event. It posts // the value that exceeded the threshold to the status strip. private void attributesDemoControl1_ThresholdExceeded( ThresholdExceededEventArgs e) { string msg = String.Format( "{0}: Value {1} exceeded threshold {2}", this.attributesDemoControl1.CurrentLogTime, e.ExceedingValue, e.ThresholdValue); this.ReportStatus( msg ); }
static void c_ExceededThreshold(Object sender, ThresholdExceededEventArgs e2) { Console.WriteLine("You guessed wrong as many times as there are letter options ({0})!\nThe program will exit now.", e2.maxAttempts); Environment.Exit(0); }