protected override void OnStop() { systemActivityService.SystemActivitySnapshot -= SystemActivityService_SystemActivitySnapshot; windowActivityService.WindowActivitySnapshot -= WindowActivityService_WindowActivitySnapshot; systemActivityService.Stop(); windowActivityService.Stop(); }
private void ExitApplication() { systemActivityService.SystemActivitySnapshot -= SystemActivityService_SystemActivitySnapshot; windowActivityService.WindowActivitySnapshot -= WindowActivityService_WindowActivitySnapshot; systemActivityService.Stop(); windowActivityService.Stop(); _isExit = true; _notifyIcon.Visible = false; MainWindow.Close(); _notifyIcon.Dispose(); _notifyIcon = null; }