public async void OnSendCodeCommandExecute(object obj) { await Task.Run(async() => { TeleStatus = "Ожидание подтверждения"; IsSetCode = false; TelegramContext.Code = AuthCode; try { await TelegramContext.AuthUserAsync(); TeleStatus = "Вы вошли успешно!!!"; IsProgramStarted = true; IsStartEnabled = true; IsCanChangeNumber = false; TLChannelFulls = await TelegramContext.GetFullInfoCannelsAsync(); foreach (var channel in TLChannelFulls) { ChannelsNames.Add(channel.About); } TelegramContext.LogOut(); MySelectedItem = ChannelsNames?[0]; } catch (Exception ex) { TeleStatus = ex.Message; if (File.Exists(PhotoPath + "dat")) { File.Delete(PhotoPath + "dat"); } } }); }