Exemplo n.º 1
0
        private async void CommentMainVideoBtn_Click(object sender, EventArgs e)
        {
            _logger.LogTrace($"{GetType()} - BEGIN {nameof(CommentMainVideoBtn_Click)}");
            if (!CheckSelectedRow())
            {
                return;
            }

            try
            {
                foreach (DataGridViewRow row in VideoDGV.SelectedRows)
                {
                    PublicationModel model = row.DataBoundItem as PublicationModel;
                    await _videoService.CommentVideoAsync(model.MainVideo, CancellationToken.None);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("¯\\(°_o)/¯ Oups, quelque chose s'est mal passé pendant l'ajout d'un commentaire sur la vidéo principale.", "Echec ajout commentaire");
                _logger.LogError(ex, "Erreur pendant l'ajout d'un commentaire");
            }
        }