该错误不会关闭程序,它仅在调试时出现。 这是认证代码的一部分。
channelWritter = Worker.GetChannelWriter(phoneTextBox.Text, apiIDTextBox.Text, apiHashTextBox.Text);
Task = new Task(() = >{
try {
Application.Current.Dispatcher.Invoke((() = >{
channelsListView.Visibility = Visibility.Collapsed;
progress1.IsActive = true;
progress1.Visibility = Visibility.Visible;
}));
var connectTask = Connect();
connectTask.Wait();
if (!channelWritter.IsAuthorized) {
Task.Wait(10000);
var authTask = AuthorizeRequest();
authTask.Wait();
Application.Current.Dispatcher.Invoke((() = >{
authorizeDialog = new AuthorizeDialog();
authorizeDialog.ShowDialog();
if (authorizeDialog.DialogResult == true) {
authCode = authorizeDialog.ResponseText;
}
}));
Task.Wait(10000);
AuthorizeConfirm(authCode).Wait();
}
}