コード例 #1
0
        private void AddResponse(object sender, RoutedEventArgs e)
        {
            ItemListComment commentSelected = (ItemListComment)(sender as FrameworkElement).DataContext;

            IdCommentToResponse                   = commentSelected.Id;
            this.TextBlock_ReponseName.Text       = commentSelected.Nom + " " + commentSelected.Prenom;
            this.TextBlock_Reponse.Visibility     = Visibility.Visible;
            this.TextBlock_ReponseName.Visibility = Visibility.Visible;
            this.AddComment.Text                  = "";
            this.AddComment.Focus();
        }
コード例 #2
0
        private void LikeComment(object sender, RoutedEventArgs e)
        {
            ItemListComment commentSelected = (ItemListComment)(sender as FrameworkElement).DataContext;

            if (dataUtils.GetListComments().Find(x => x.Id == commentSelected.Id).ListIdLikers.Contains(UserConnected.GetUserConnected().Id))
            {
                dataUtils.GetListComments().Find(x => x.Id == commentSelected.Id).ListIdLikers.Remove(UserConnected.GetUserConnected().Id);
            }
            else
            {
                dataUtils.GetListComments().Find(x => x.Id == commentSelected.Id).ListIdLikers.Add(UserConnected.GetUserConnected().Id);
            }
            OrganizeListComment();
            this.ListComments.ItemsSource = _listItemComment;
        }