private void MainWindow_FormClosing(object sender, FormClosingEventArgs e) { timer.Stop(); timer.Close(); TorrentXMLHandler.Save(); this.Dispose(); }