private void StopButton_Click(object sender, EventArgs e) { if (CurrentSession != null) { CurrentSession.CancelAsync(); } }