Example #1
0
        /// <summary>
        /// Like trong chi tiết comment
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TapGestureRecognizer_Tapped_1(object sender, EventArgs e)
        {
            var view   = sender as StackLayout;
            var parent = ((ReplayCommentPageViewModel)view.BindingContext).ReplyComment.Comment;

            if (model != null)
            {
                if (parent.LikeColor.Equals("#5D6A76"))
                {
                    LikeAction.SendLike(true, ref parent);
                }
                else
                {
                    LikeAction.SendLike(false, ref parent);
                }
            }
        }
Example #2
0
        /// <summary>
        /// Like Content trong chi tiết content
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ItemNewsView_TabLike(object sender, EventArgs e)
        {
            var         model  = BindingContext as ClubPageViewModel;
            var         stack  = sender as StackLayout;
            var         parent = (ContentInfo)stack?.BindingContext;
            Label       like   = stack.Children[1] as Label;
            CachedImage img    = stack.Children[0] as CachedImage;

            if (parent.LikeContent.LikeColor.Equals("#5D6A76"))
            {
                LikeAction.SendLike(true, ref parent);
            }
            else
            {
                LikeAction.SendLike(false, ref parent);
            }
        }