private async void BtnStop_OnClick(object sender, RoutedEventArgs e) { cancellationTokenSource.Cancel(); await Logic.Instance.Close(); btnStart.IsEnabled = true; _lastOperate.Clear(); txtStatus.Text = ""; }