1: 2: 3: 4: 5: 6: 7: 8: 9: 10:
ActivityMonitor.ActivityMonitor _am = new ActivityMonitor.ActivityMonitor(); _am.WarningMinutes = 0.9; _am.MaxMinutesIdle = 1; _am.Idle += new EventHandler(am_Idle); void am_Idle(object sender, EventArgs e) { Application.Exit(); }