public override void AwakeFromNib() { base.AwakeFromNib(); DeleteButton.SetCommand(DataContext.DeletePostCommand); LikeButton.SetCommand(DataContext.LikePostCommand); }
public override void AwakeFromNib() { base.AwakeFromNib(); UserName.Text = AppSettingsManager.FirstName + " " + AppSettingsManager.LastName; using (var url = new NSUrl(AppSettingsManager.ProfilePictureUrl)) using (var data = NSData.FromUrl(url)) { ProfilePictureImageView.Image = UIImage.LoadFromData(data); } LikeButton.TouchUpInside += (sender, args) => { CurrentPhoto.IsLiked = !CurrentPhoto.IsLiked; LikeButton.SetTitleColor(CurrentPhoto.IsLiked ? UIColor.Red : UIColor.Blue, UIControlState.Normal); }; //DeleteButton.TouchUpInside += ( sender, args ) => { // CurrentPhoto.ToBeDeleted = true; // //ContentView.Hidden = true; // //ContentView.Frame = CGRect.Empty; // //Frame = CGRect.Empty; // //_table.ReloadRows(new[] { _path}, UITableViewRowAnimation.Fade ); // _table.Delete(null); // PhotoDataSource.Source.RemoveAtIndex(_path); // _table.DeleteRows(new [] {_path}, UITableViewRowAnimation.Automatic ); //}; }
// GroupDiscussionList rptGroupDiscussion; protected void Page_Load(object sender, EventArgs e) { lbSubmitReply.Text = DictionaryConstants.SubmitButtonText; // rptGroupDiscussion = (GroupDiscussionList)Page.LoadControl("~/Presentation/Sublayouts/Common/GroupDiscussionList.ascx"); // rptGroupDiscussion.ID = "rptGroupCards"; // plhGroupDiscussions.Controls.Add(rptGroupDiscussion); //if (!IsPostBack) //{ txtBody.Attributes.Add("placeholder", "Join the discussion"); txtBody.Attributes.Add("id", "join-discussion-text"); Item currItem = Sitecore.Context.Item; if (currItem != null) { hrfBack.HRef = LinkManager.GetItemUrl(currItem.Parent); litBack.Text = currItem.Parent.Name; GroupDiscussionItem grpDItem = new GroupDiscussionItem(currItem); if (grpDItem != null) { Session["discussionItem"] = grpDItem; string forumID = grpDItem.ForumID.Text; string threadID = grpDItem.ThreadID.Text; try { ThreadModel thModel = UnderstoodDotOrg.Services.CommunityServices.Threads.ThreadModelFactory(forumID, threadID); //Populate the initial Post ProfileCommentCard.LoadState(thModel.Author); rptGroupDiscussion.DataSource = thModel.Replies; rptGroupDiscussion.DataBind(); if (thModel.Author != null) { ThanksButton.LoadState(thModel.Author.UserName); ThinkingOfYouButton.LoadState(thModel.Author.UserName); } lblSubject.Text = thModel.Subject; litComment.Text = thModel.Body; litNumReplies.Text = thModel.ReplyCount; LikeButton.LoadState(thModel.ContentId, thModel.ContentTypeId); litMemberCount.Text = thModel.Replies.Select(m => m.AuthorName).Distinct().Count().ToString(); } catch (Exception ex) { Sitecore.Diagnostics.Error.LogError("Error Retrieving replies Page_Load Parent Group Discussions.\nError" + ex.Message); } } } //} }
public void SaveToFavourites() { string colorOfLikeButton = LikeButton.GetCssValue("style"); if (colorOfLikeButton == "color:black;") { LikeButton.Click(); } }
public void DeleteFromFovourites() { string colorOfLikeButton = LikeButton.GetCssValue("style"); if (colorOfLikeButton == "color:red;") { LikeButton.Click(); } }
public void Liked(LikeButton p0) { var adapterPosition = (int)p0.GetTag(Resource.Id.favorite_item_tag_key); if (adapterPosition > -1) { ViewModel.ItemsSource[adapterPosition].IsFavorite = true; ViewModel.AddToFavoritesCommand.Execute(ViewModel.ItemsSource[adapterPosition]); } }
public void UnLiked(LikeButton p0) { var adapterPosition = (int)p0.GetTag(Resource.Id.favorite_item_tag_key); if (adapterPosition > -1 && ViewModel.ItemsSource.Count > adapterPosition) { ViewModel.ItemsSource[adapterPosition].IsFavorite = false; ViewModel.RemoveFavoriteItemCommand.Execute(ViewModel.ItemsSource[adapterPosition]); } }
void ReleaseDesignerOutlets() { if (BottomBar != null) { BottomBar.Dispose(); BottomBar = null; } if (DateLabel != null) { DateLabel.Dispose(); DateLabel = null; } if (DeleteButton != null) { DeleteButton.Dispose(); DeleteButton = null; } if (LikeButton != null) { LikeButton.Dispose(); LikeButton = null; } if (PhotoImageView != null) { PhotoImageView.Dispose(); PhotoImageView = null; } if (ProfilePictureImageView != null) { ProfilePictureImageView.Dispose(); ProfilePictureImageView = null; } if (TopBar != null) { TopBar.Dispose(); TopBar = null; } if (UserName != null) { UserName.Dispose(); UserName = null; } }
private void InitComponents() { toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); toolbar.SetNavigationOnClickListener(this); SetSupportActionBar(toolbar); if (SupportActionBar != null) { SupportActionBar.Title = string.Empty; SupportActionBar.SetDisplayHomeAsUpEnabled(true); SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_action_back); for (int i = 0; i < toolbar.ChildCount; i++) { View child = toolbar.GetChildAt(i); if (child is TextView toolbarTitle) { toolbarTitle.SetTypeface(FontUtils.GetBoldFont(this), Android.Graphics.TypefaceStyle.Normal); break; } } } collapsingToolbar = FindViewById <Android.Support.Design.Widget.CollapsingToolbarLayout>(Resource.Id.collapsingtoolbar_layout); collapsingToolbar.SetExpandedTitleTextAppearance(Resource.Style.ExpandedAppBar); collapsingToolbar.SetCollapsedTitleTextAppearance(Resource.Style.CollapsedAppBar); likeButton = FindViewById <LikeButton>(Resource.Id.likeButton); likeButton.SetOnLikeListener(this); if (ViewModel.MovieDetails.IsFavorite) { likeButton.SetLiked(Java.Lang.Boolean.True); } var chipGroup = FindViewById <ChipGroup>(Resource.Id.genre_chipGroup); AddGenreChips(chipGroup); var writeareview = FindViewById <Button>(Resource.Id.writeareview_button); writeareview.SetTypeface(FontUtils.GetNormalFont(this), TypefaceStyle.Normal); attachmentImageView = FindViewById <Refractored.Controls.CircleImageView>(Resource.Id.attachment_imageView); if (ViewModel.CurrentMovieReview != null) { AddAttachment(); } }
public override void ViewDidLoad() { base.ViewDidLoad(); var centerButton = new CenterButton(); centerButton.TouchUpInside += (s, e) => { //TableView.ScrollRectToVisible(new CGRect(0, 0, 1, 1), false); ViewModel.StumbleCommand.ExecuteIfCan(); }; var stumbleButton = new UIBarButtonItem(centerButton) { Enabled = false }; stumbleButton.EnableIfExecutable(ViewModel.StumbleCommand.CanExecuteObservable); ToolbarItems = new [] { new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), DislikeButton, new UIBarButtonItem(UIBarButtonSystemItem.FixedSpace) { Width = 40 }, stumbleButton, new UIBarButtonItem(UIBarButtonSystemItem.FixedSpace) { Width = 40 }, LikeButton, new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), }; ViewModel.StumbleCommand.CanExecuteObservable.Subscribe(x => centerButton.Disabled = !x); DislikeButton.EnableIfExecutable(ViewModel.StumbleCommand.CanExecuteObservable); LikeButton.EnableIfExecutable(ViewModel.StumbleCommand.CanExecuteObservable); ViewModel.DislikeCommand.Subscribe(_ => DisplayResponse(Images.ThumbDownFilled)); ViewModel.LikeCommand.Subscribe(_ => DisplayResponse(Images.ThumbUpFilled)); ViewModel.StumbleCommand.ExecuteIfCan(); }
void ReleaseDesignerOutlets() { if (DescriptionLabel != null) { DescriptionLabel.Dispose(); DescriptionLabel = null; } if (LikeButton != null) { LikeButton.Dispose(); LikeButton = null; } if (LikesCountLabel != null) { LikesCountLabel.Dispose(); LikesCountLabel = null; } if (PostImageView != null) { PostImageView.Dispose(); PostImageView = null; } if (UserImageView != null) { UserImageView.Dispose(); UserImageView = null; } if (UserTagLabel != null) { UserTagLabel.Dispose(); UserTagLabel = null; } if (DeleteButton != null) { DeleteButton.Dispose(); DeleteButton = null; } }
void ReleaseDesignerOutlets() { if (LikeImage != null) { LikeImage.Dispose(); LikeImage = null; } if (LikeLabel != null) { LikeLabel.Dispose(); LikeLabel = null; } if (LikeButton != null) { LikeButton.Dispose(); LikeButton = null; } }
void OnPropertyChanged(object sender, PropertyChangedEventArgs args) { var name = args.PropertyName; if (name.Equals("IsLikedByUser")) { LikeButton.SetTitleColor(ViewModel.LikeButtonTextColor.ToUIColor(), UIControlState.Normal); LikeButton.SetTitle(ViewModel.LikeButtonText, UIControlState.Normal); } else if (name.Equals("IsCommentedByUser")) { CommentButton.SetTitleColor(ViewModel.CommentButtonTextColor.ToUIColor(), UIControlState.Normal); CommentButton.SetTitle(ViewModel.CommentButtonText, UIControlState.Normal); } else if (name.Equals("IsSharedByUser")) { ShareButton.SetTitleColor(ViewModel.ShareButtonTextColor.ToUIColor(), UIControlState.Normal); ShareButton.SetTitle(ViewModel.ShareButtonText, UIControlState.Normal); } }
public PostAdapterViewHolder(View itemView, Action <PostAdapterClickEventArgs> clickListener, Action <PostAdapterClickEventArgs> longClickListener) : base(itemView) { usernameTextView = (TextView)itemView.FindViewById(Resource.Id.post_name_tv); postBodyTextView = (TextView)itemView.FindViewById(Resource.Id.post_caption_tv); likeCountTextView = (TextView)itemView.FindViewById(Resource.Id.post_like_count_tv); postImageView = (ImageView)itemView.FindViewById(Resource.Id.post_img_iv); profileImageView = (CircleImageView)itemView.FindViewById(Resource.Id.post_user_profile); durationTextView = (TextView)itemView.FindViewById(Resource.Id.post_time_tv); postLikeBtn = itemView.FindViewById <LikeButton>(Resource.Id.post_like_btn); itemView.Click += (sender, e) => clickListener(new PostAdapterClickEventArgs { View = itemView, Position = AdapterPosition, ImageView = postImageView }); itemView.LongClick += (sender, e) => longClickListener(new PostAdapterClickEventArgs { View = itemView, Position = AdapterPosition }); postLikeBtn.SetOnLikeListener(new OnLikeEventListener((liked) => { }, (unliked) => { var likeref = SessionManager.GetFireDB().GetReference($"posts/{_items[AdapterPosition].ID}/likes/{SessionManager.UserId}"); likeref.AddValueEventListener(new SingleValueListener((s) => { if (!s.Exists()) { return; } likeref.RemoveValue(); }, (de) => { })); })); }
protected void AnswerRepeater_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e) { if (e.IsItem()) { var item = (Answer)e.Item.DataItem; Item currItem = Sitecore.Context.Item; var q = Questions.QuestionFactory(currItem); HyperLink hypUserProfileLink = (HyperLink)e.Item.FindControl("hypUserProfileLink"); if (hypUserProfileLink != null) { hypUserProfileLink.NavigateUrl = MembershipHelper.GetPublicProfileUrl(item.Author); } LikeButton btnLikeCtrl = e.FindControlAs <LikeButton>("LikeButton"); if (btnLikeCtrl != null) { btnLikeCtrl.LoadState(item.ContentId, item.ContentTypeId); } HtmlButton btnLikeThumbsUp = e.FindControlAs <HtmlButton>("btnLike"); if (btnLikeThumbsUp != null) { btnLikeThumbsUp.Attributes.Add("commentContentId", item.ContentId); } //Literal litGroup = e.FindControlAs<Literal>("lbGroup"); //if (litGroup !=null) //{ // if(q!=null){ // litGroup.Text = q.Group; // } //} //HtmlAnchor hrefAnchor = e.FindControlAs<HtmlAnchor>("hrefTopic"); //if (hrefAnchor != null) //{ // hrefAnchor.HRef = currItem.Parent.GetUrl() + "?topic=" + HttpUtility.UrlEncode(q.Group); //} } }
void ReleaseDesignerOutlets() { if (TimelineView != null) { TimelineView.Dispose(); TimelineView = null; } if (ActivityIndicator != null) { ActivityIndicator.Dispose(); ActivityIndicator = null; } if (BodyTextView != null) { BodyTextView.Dispose(); BodyTextView = null; } if (BodyTextViewHeightConstraint != null) { BodyTextViewHeightConstraint.Dispose(); BodyTextViewHeightConstraint = null; } if (CommentButton != null) { CommentButton.Dispose(); CommentButton = null; } if (ContainerView != null) { ContainerView.Dispose(); ContainerView = null; } if (LikeButton != null) { LikeButton.Dispose(); LikeButton = null; } if (NameLabel != null) { NameLabel.Dispose(); NameLabel = null; } if (PhotoImageView != null) { PhotoImageView.Dispose(); PhotoImageView = null; } if (PhotoImageViewHeightConstraint != null) { PhotoImageViewHeightConstraint.Dispose(); PhotoImageViewHeightConstraint = null; } if (ShareButton != null) { ShareButton.Dispose(); ShareButton = null; } if (SocialTypeImageView != null) { SocialTypeImageView.Dispose(); SocialTypeImageView = null; } if (TimeLabel != null) { TimeLabel.Dispose(); TimeLabel = null; } if (UserImageView != null) { UserImageView.Dispose(); UserImageView = null; } if (ContainerViewLeadingConstraint != null) { ContainerViewLeadingConstraint.Dispose(); ContainerViewLeadingConstraint = null; } }
public void Liked(LikeButton button) { likeHandler(button); }
public void UnLiked(LikeButton likeButton) => _onUnLiked?.Invoke(likeButton);
public void UnLiked(LikeButton button) { unlikeHandler(button); }
public static void SetOnLikeAction(this LikeButton self, Action <LikeButton> likeHandler, Action <LikeButton> unlikeHandler) { self.SetOnLikeListener(new DelegateOnLikeListener(likeHandler, unlikeHandler)); }
public void UpdateCellData(RewardItemModel item) { var test = this.Frame.Width; lblPointsCount.Text = item.MinScore.ToString(); lblAviableUnits.Text = string.Format("{0} Units Available", item.RemainingUnits); ImageService.Instance.LoadUrl(item.MainImageURL).Into(RewardImage); this.SelectionStyle = UITableViewCellSelectionStyle.None; LikeButton.SetImage(UIImage.FromBundle("points-icon_off"), UIControlState.Normal); UIStringAttributes stringAttributes = new UIStringAttributes { Font = UIFont.FromName("ProximaNova-Bold", UIScreen.MainScreen.Bounds.Width * 0.055f), ForegroundColor = UIColor.Black, ParagraphStyle = new NSMutableParagraphStyle() { LineSpacing = 6.0f } }; var attributedText = new NSMutableAttributedString(item.Name); attributedText.AddAttributes(stringAttributes, new NSRange(0, item.Name.Length)); RewardName.AttributedText = attributedText; RewardImage.Layer.CornerRadius = RewardImageOverlay.Layer.CornerRadius = UIScreen.MainScreen.Bounds.Width / 100 * 0.48f; bool noPoints = item.MinScore > SL.Profile.Score; bool Locked = (item.AutoUnlockDate?.ToLocalTime() ?? DateTime.Now) > DateTime.Now; //item.MinScore = (int)(SL.Profile.Score * 0.8f);//Hardcode if (noPoints && Locked) { lockStatus.Image = UIImage.FromBundle("lock-icon"); unlockStatus.Text = item.NextEventCountDown; //string.Format("{0} {1:hh}h:{1:mm}m:{1:ss}s", "Unlocks in", (TimeSpan)((item?.AutoUnlockDate?? DateTime.Now) - DateTime.Now));//.ToString(@"hh h\:mm m\:ss s\")); float iconStatusWidth = (float)(Frame.Width / 7.009); float statusLabelWidth = (float)(Frame.Width / 8.8); topLeftIcon.BackgroundColor = UIColor.White; topLeftIcon.Layer.BorderColor = UIColor.FromRGB(229, 229, 229).CGColor; topLeftIcon.Layer.BorderWidth = iconStatusWidth * 0.037f; topLeftIcon.Layer.CornerRadius = iconStatusWidth / 2; vStatusBorderLeft.Layer.BorderWidth = iconStatusWidth * 0.037f; vStatusBorderLeft.Layer.CornerRadius = iconStatusWidth / 2; vStatusBorderLeft.Layer.BorderColor = UIColor.FromRGB(232, 31, 138).CGColor; vStatusCircleLeft.Layer.CornerRadius = statusLabelWidth / 2; //topLeftIcon.BackgroundColor = UIColor.White; //topLeftIcon.Layer.BorderColor = UIColor.FromRGB(229, 229, 229).CGColor; //topLeftIcon.Layer.BorderWidth = topLeftIcon.Bounds.Width * 0.037f; //topLeftIcon.Layer.CornerRadius = topLeftIcon.Bounds.Width / 2; //vStatusBorderLeft.Layer.BorderWidth = vStatusBorderLeft.Bounds.Width * 0.037f; //vStatusBorderLeft.Layer.CornerRadius = vStatusBorderLeft.Bounds.Width / 2; //vStatusBorderLeft.Layer.BorderColor = UIColor.FromRGB(232, 31, 138).CGColor; //vStatusCircleLeft.Layer.CornerRadius = vStatusCircleLeft.Bounds.Width / 2; //cnStatusPercentLeft.Constant = (nfloat)(vPercentContainerLeft.Bounds.Width * (SL.Profile.Score / item.MinScore) - vPercentContainerLeft.Bounds.Width / 2); vPercentContainerLeft.Hidden = false; //UILabel lblStatusCount; //if (SL.Profile.Score / item.MinScore > 0.7) //{ // lblStatusCount = lblStatusCountBottomLeft; //} //else //{ // lblStatusCount = lblStatusCountTopLeft; //} //lblStatusCount.Hidden = false; //lblStatusCount.Text = (item.MinScore - SL.Profile.Score).ToString(); //topLeftIcon.Image = UIImage.FromBundle("small-score-icon"); lblStatusCountTopLeft.Hidden = false; lblStatusCountTopLeft.Text = (item.MinScore - SL.Profile.Score).ToString(); } else if (noPoints && !Locked) { //iconStatus.Image = UIImage.FromBundle("small-score-icon"); iconStatus.BackgroundColor = UIColor.White; iconStatus.Layer.BorderColor = UIColor.FromRGB(229, 229, 229).CGColor; float iconStatusWidth = (float)(Frame.Width / 7.211); float statusLabelWidth = (float)(Frame.Width / 8.8); iconStatus.Layer.BorderWidth = iconStatusWidth * 0.037f; iconStatus.Layer.CornerRadius = iconStatusWidth / 2; vStatusBorder.Layer.BorderWidth = iconStatusWidth * 0.037f; vStatusBorder.Layer.CornerRadius = iconStatusWidth / 2; vStatusBorder.Layer.BorderColor = UIColor.FromRGB(232, 31, 138).CGColor; vStatusCircle.Layer.CornerRadius = statusLabelWidth / 2; /* * iconStatus.Layer.BorderWidth = iconStatus.Bounds.Width * 0.037f; * iconStatus.Layer.CornerRadius = iconStatus.Bounds.Width / 2; * vStatusBorder.Layer.BorderWidth = vStatusBorder.Bounds.Width * 0.037f; * vStatusBorder.Layer.CornerRadius = vStatusBorder.Bounds.Width / 2; * vStatusBorder.Layer.BorderColor = UIColor.FromRGB(232, 31, 138).CGColor; * vStatusCircle.Layer.CornerRadius = vStatusCircle.Bounds.Width / 2; */ //cnStatusPercent.Constant = (nfloat)(vPercentContainer.Bounds.Width * (SL.Profile.Score / item.MinScore) - vPercentContainer.Bounds.Width / 2); needMoreStatus.Text = "MORE NEEDED"; vPercentContainer.Hidden = false; //UILabel lblStatusCount; //if (SL.Profile.Score / item.MinScore > 0.7) //{ // lblStatusCount = lblStatusCountBottom; //} //else //{ // lblStatusCount = lblStatusCountTop; //} lblStatusCountTop.Text = (item.MinScore - SL.Profile.Score).ToString(); lblStatusCountTop.Hidden = false; //lblStatusCount = lblStatusCountBottom; //lblStatusCount.Hidden = false; //lblStatusCount.Text = (item.MinScore - SL.Profile.Score).ToString(); } else if (!noPoints && Locked) { lockStatus.Image = UIImage.FromBundle("lock-icon"); unlockStatus.Text = item.NextEventCountDown; //string.Format("{0} {1:hh}h:{1:mm}m:{1:ss}s", "Unlocks in", (TimeSpan)((item?.AutoUnlockDate?? DateTime.Now) - DateTime.Now));//.ToString(@"hh h\:mm m\:ss s\")); topStatusImage.Image = UIImage.FromBundle("circle_green"); } else if (!noPoints && !Locked)//Available { cnCenterStatusWidth.Constant = RewardImageOverlay.Bounds.Width * cnTopStatusImageWidth.Multiplier - RewardImageOverlay.Bounds.Width * cnCenterStatusWidth.Multiplier; iconStatus.Image = UIImage.FromBundle("circle_green"); } }
public void Liked(LikeButton button) { likeHandler(button); }
public string GetId() { return(LikeButton.GetAttribute("data-id")); }
void ReleaseDesignerOutlets() { if (cnCenterStatusWidth != null) { cnCenterStatusWidth.Dispose(); cnCenterStatusWidth = null; } if (cnStatusPercent != null) { cnStatusPercent.Dispose(); cnStatusPercent = null; } if (cnStatusPercentLeft != null) { cnStatusPercentLeft.Dispose(); cnStatusPercentLeft = null; } if (cnTopStatusImageWidth != null) { cnTopStatusImageWidth.Dispose(); cnTopStatusImageWidth = null; } if (DescriptionView != null) { DescriptionView.Dispose(); DescriptionView = null; } if (iconStatus != null) { iconStatus.Dispose(); iconStatus = null; } if (lblAviableUnits != null) { lblAviableUnits.Dispose(); lblAviableUnits = null; } if (lblPointsCount != null) { lblPointsCount.Dispose(); lblPointsCount = null; } if (lblStatusCountBottom != null) { lblStatusCountBottom.Dispose(); lblStatusCountBottom = null; } if (lblStatusCountBottomLeft != null) { lblStatusCountBottomLeft.Dispose(); lblStatusCountBottomLeft = null; } if (lblStatusCountTop != null) { lblStatusCountTop.Dispose(); lblStatusCountTop = null; } if (lblStatusCountTopLeft != null) { lblStatusCountTopLeft.Dispose(); lblStatusCountTopLeft = null; } if (LeadingSpaceDescriptionConstraint != null) { LeadingSpaceDescriptionConstraint.Dispose(); LeadingSpaceDescriptionConstraint = null; } if (LeadingSpaceImageConstraint != null) { LeadingSpaceImageConstraint.Dispose(); LeadingSpaceImageConstraint = null; } if (LikeButton != null) { LikeButton.Dispose(); LikeButton = null; } if (lockStatus != null) { lockStatus.Dispose(); lockStatus = null; } if (needMoreStatus != null) { needMoreStatus.Dispose(); needMoreStatus = null; } if (RewardImage != null) { RewardImage.Dispose(); RewardImage = null; } if (RewardImageOverlay != null) { RewardImageOverlay.Dispose(); RewardImageOverlay = null; } if (RewardName != null) { RewardName.Dispose(); RewardName = null; } if (statusContainer != null) { statusContainer.Dispose(); statusContainer = null; } if (topLeftIcon != null) { topLeftIcon.Dispose(); topLeftIcon = null; } if (topStatusImage != null) { topStatusImage.Dispose(); topStatusImage = null; } if (TrailingSpaceDescriptionConstraint != null) { TrailingSpaceDescriptionConstraint.Dispose(); TrailingSpaceDescriptionConstraint = null; } if (unlockStatus != null) { unlockStatus.Dispose(); unlockStatus = null; } if (vPercentContainer != null) { vPercentContainer.Dispose(); vPercentContainer = null; } if (vPercentContainerLeft != null) { vPercentContainerLeft.Dispose(); vPercentContainerLeft = null; } if (vStatusBorder != null) { vStatusBorder.Dispose(); vStatusBorder = null; } if (vStatusBorderLeft != null) { vStatusBorderLeft.Dispose(); vStatusBorderLeft = null; } if (vStatusCircle != null) { vStatusCircle.Dispose(); vStatusCircle = null; } if (vStatusCircleLeft != null) { vStatusCircleLeft.Dispose(); vStatusCircleLeft = null; } }
void ReleaseDesignerOutlets() { if (Actor_Name != null) { Actor_Name.Dispose(); Actor_Name = null; } if (Actor_NameHeight != null) { Actor_NameHeight.Dispose(); Actor_NameHeight = null; } if (ActorImage != null) { ActorImage.Dispose(); ActorImage = null; } if (BackgroundContentFriendJoined != null) { BackgroundContentFriendJoined.Dispose(); BackgroundContentFriendJoined = null; } if (BackgroundProductSold != null) { BackgroundProductSold.Dispose(); BackgroundProductSold = null; } if (btn_OtherUsers != null) { btn_OtherUsers.Dispose(); btn_OtherUsers = null; } if (btnDotsTop != null) { btnDotsTop.Dispose(); btnDotsTop = null; } if (btnOpenInvitedProfile != null) { btnOpenInvitedProfile.Dispose(); btnOpenInvitedProfile = null; } if (ButtonFacebook != null) { ButtonFacebook.Dispose(); ButtonFacebook = null; } if (ButtonInviteFriends != null) { ButtonInviteFriends.Dispose(); ButtonInviteFriends = null; } if (ButtonProductSold != null) { ButtonProductSold.Dispose(); ButtonProductSold = null; } if (ButtonRewardClaimed != null) { ButtonRewardClaimed.Dispose(); ButtonRewardClaimed = null; } if (ButtonTwitter != null) { ButtonTwitter.Dispose(); ButtonTwitter = null; } if (CollectionUserView != null) { CollectionUserView.Dispose(); CollectionUserView = null; } if (CommentButton != null) { CommentButton.Dispose(); CommentButton = null; } if (CommentsText != null) { CommentsText.Dispose(); CommentsText = null; } if (ContectRewardClaimed != null) { ContectRewardClaimed.Dispose(); ContectRewardClaimed = null; } if (ContectRewardClaimedAspectRatio != null) { ContectRewardClaimedAspectRatio.Dispose(); ContectRewardClaimedAspectRatio = null; } if (ContectRewardClaimedRightBackground != null) { ContectRewardClaimedRightBackground.Dispose(); ContectRewardClaimedRightBackground = null; } if (ContectRewardClaimedTitle != null) { ContectRewardClaimedTitle.Dispose(); ContectRewardClaimedTitle = null; } if (ContentCollectionAvatarView != null) { ContentCollectionAvatarView.Dispose(); ContentCollectionAvatarView = null; } if (ContentCollectionAvatarViewAspectRatio != null) { ContentCollectionAvatarViewAspectRatio.Dispose(); ContentCollectionAvatarViewAspectRatio = null; } if (ContentCollectionCheckInView != null) { ContentCollectionCheckInView.Dispose(); ContentCollectionCheckInView = null; } if (ContentCollectionCheckInViewAspectRatio != null) { ContentCollectionCheckInViewAspectRatio.Dispose(); ContentCollectionCheckInViewAspectRatio = null; } if (ContentFriendJoined != null) { ContentFriendJoined.Dispose(); ContentFriendJoined = null; } if (ContentFriendJoinedAspectRatio != null) { ContentFriendJoinedAspectRatio.Dispose(); ContentFriendJoinedAspectRatio = null; } if (ContentFriendJoinedBackground != null) { ContentFriendJoinedBackground.Dispose(); ContentFriendJoinedBackground = null; } if (ContentFriendJoinedPhoto != null) { ContentFriendJoinedPhoto.Dispose(); ContentFriendJoinedPhoto = null; } if (ContentFriendJoinedUserName != null) { ContentFriendJoinedUserName.Dispose(); ContentFriendJoinedUserName = null; } if (ContentHeaderView != null) { ContentHeaderView.Dispose(); ContentHeaderView = null; } if (ContentImage != null) { ContentImage.Dispose(); ContentImage = null; } if (ContentImageAspectRatio != null) { ContentImageAspectRatio.Dispose(); ContentImageAspectRatio = null; } if (ContentImageTextCaption != null) { ContentImageTextCaption.Dispose(); ContentImageTextCaption = null; } if (ContentMap != null) { ContentMap.Dispose(); ContentMap = null; } if (ContentMapAspectRatio != null) { ContentMapAspectRatio.Dispose(); ContentMapAspectRatio = null; } if (ContentMapView != null) { ContentMapView.Dispose(); ContentMapView = null; } if (ContentProductSold != null) { ContentProductSold.Dispose(); ContentProductSold = null; } if (ContentProductSoldAspectRatio != null) { ContentProductSoldAspectRatio.Dispose(); ContentProductSoldAspectRatio = null; } if (ContentProductSoldTextView != null) { ContentProductSoldTextView.Dispose(); ContentProductSoldTextView = null; } if (ContentShare != null) { ContentShare.Dispose(); ContentShare = null; } if (ContentShareAspectRatio != null) { ContentShareAspectRatio.Dispose(); ContentShareAspectRatio = null; } if (ContentText != null) { ContentText.Dispose(); ContentText = null; } if (ContentTextHeight != null) { ContentTextHeight.Dispose(); ContentTextHeight = null; } if (ContentVideo != null) { ContentVideo.Dispose(); ContentVideo = null; } if (ContentVideoAspectRatio != null) { ContentVideoAspectRatio.Dispose(); ContentVideoAspectRatio = null; } if (ContentVideoButtonPlay != null) { ContentVideoButtonPlay.Dispose(); ContentVideoButtonPlay = null; } if (ContentWebView != null) { ContentWebView.Dispose(); ContentWebView = null; } if (ContentWebViewAspectRatio != null) { ContentWebViewAspectRatio.Dispose(); ContentWebViewAspectRatio = null; } if (Creation_Date != null) { Creation_Date.Dispose(); Creation_Date = null; } if (Creation_DateHeight != null) { Creation_DateHeight.Dispose(); Creation_DateHeight = null; } if (GradientImageView != null) { GradientImageView.Dispose(); GradientImageView = null; } if (GradientImageViewAspect != null) { GradientImageViewAspect.Dispose(); GradientImageViewAspect = null; } if (IconContentFriendJoined != null) { IconContentFriendJoined.Dispose(); IconContentFriendJoined = null; } if (IconProductSold != null) { IconProductSold.Dispose(); IconProductSold = null; } if (Label_ContectReward_Claimed != null) { Label_ContectReward_Claimed.Dispose(); Label_ContectReward_Claimed = null; } if (LabelFriendsWelcome != null) { LabelFriendsWelcome.Dispose(); LabelFriendsWelcome = null; } if (LikeButton != null) { LikeButton.Dispose(); LikeButton = null; } if (LikesText != null) { LikesText.Dispose(); LikesText = null; } if (LikesView != null) { LikesView.Dispose(); LikesView = null; } if (LikesViewHeightAspecnRatio != null) { LikesViewHeightAspecnRatio.Dispose(); LikesViewHeightAspecnRatio = null; } if (LineSeparator != null) { LineSeparator.Dispose(); LineSeparator = null; } if (MainBackgroundView != null) { MainBackgroundView.Dispose(); MainBackgroundView = null; } if (MainView != null) { MainView.Dispose(); MainView = null; } if (PointsIconWidthConstraint != null) { PointsIconWidthConstraint.Dispose(); PointsIconWidthConstraint = null; } if (ProductSoldCount != null) { ProductSoldCount.Dispose(); ProductSoldCount = null; } if (ProductSoldMainBackground != null) { ProductSoldMainBackground.Dispose(); ProductSoldMainBackground = null; } if (ProductSoldTitle != null) { ProductSoldTitle.Dispose(); ProductSoldTitle = null; } if (ProductSoldUpBackground != null) { ProductSoldUpBackground.Dispose(); ProductSoldUpBackground = null; } if (PtsText != null) { PtsText.Dispose(); PtsText = null; } if (ReadCommentButtonHeight != null) { ReadCommentButtonHeight.Dispose(); ReadCommentButtonHeight = null; } if (ReadCommentsButton != null) { ReadCommentsButton.Dispose(); ReadCommentsButton = null; } if (RewardClaimedCount != null) { RewardClaimedCount.Dispose(); RewardClaimedCount = null; } if (SmileButton != null) { SmileButton.Dispose(); SmileButton = null; } if (TextContentFriendJoined != null) { TextContentFriendJoined.Dispose(); TextContentFriendJoined = null; } if (TextProductSold != null) { TextProductSold.Dispose(); TextProductSold = null; } if (TextQuoteLineSeparatorHeight != null) { TextQuoteLineSeparatorHeight.Dispose(); TextQuoteLineSeparatorHeight = null; } if (TopActionText != null) { TopActionText.Dispose(); TopActionText = null; } if (TopActionTextHeight != null) { TopActionTextHeight.Dispose(); TopActionTextHeight = null; } if (TopPaddingView != null) { TopPaddingView.Dispose(); TopPaddingView = null; } if (TopPaddingViewAspect != null) { TopPaddingViewAspect.Dispose(); TopPaddingViewAspect = null; } if (TopView != null) { TopView.Dispose(); TopView = null; } if (TopViewHeight != null) { TopViewHeight.Dispose(); TopViewHeight = null; } if (uiProfileButton != null) { uiProfileButton.Dispose(); uiProfileButton = null; } if (vDotsTop != null) { vDotsTop.Dispose(); vDotsTop = null; } if (vDotsTopHeight != null) { vDotsTopHeight.Dispose(); vDotsTopHeight = null; } }
public void UnLiked(LikeButton button) { unlikeHandler(button); }
public void UnLiked(LikeButton p0) { ViewModel.MovieDetails.IsFavorite = false; ViewModel.AddToFavoritesCommand.Execute(ViewModel.MovieDetails); }
void InitUI() { // Adjust constraints as needed PhotoImageViewHeightConstraint.Constant = ViewModel.ShowImage ? _photoImageViewDefaultHeightConstraint : 0; // Map values to UI elements BodyTextView.Text = null; BodyTextView.Text = ViewModel.Text; BodyTextViewHeightConstraint.Constant = BodyTextView.SizeThatFits(new CGSize(BodyTextView.Frame.Width, nfloat.MaxValue)).Height; TimeLabel.Text = ViewModel.ShowDateTime ? ViewModel.DisplayDateTime : string.Empty; NameLabel.SetHighlightText(ViewModel.UserName, ViewModel.UserName.IndexOf("@"), UIColor.LightGray); LikeButton.SetTitle(ViewModel.LikeButtonText, UIControlState.Normal); LikeButton.SetTitleColor(ViewModel.LikeButtonTextColor.ToUIColor(), UIControlState.Normal); CommentButton.SetTitle(ViewModel.CommentButtonText, UIControlState.Normal); CommentButton.SetTitleColor(ViewModel.CommentButtonTextColor.ToUIColor(), UIControlState.Normal); ShareButton.SetTitle(ViewModel.ShareButtonText, UIControlState.Normal); ShareButton.SetTitleColor(ViewModel.ShareButtonTextColor.ToUIColor(), UIControlState.Normal); if (ViewModel.ShowImage) { ActivityIndicator.StartAnimating(); } else { ActivityIndicator.StopAnimating(); } SocialTypeImageView.Image = UIImage.FromBundle(ViewModel.SocialMediaImage); SocialTypeImageView.Hidden = !ViewModel.ShowSocialMediaImage; UserImageView.SetImage( url: new NSUrl(ViewModel.UserImageUrl), placeholder: UIImage.FromBundle(ViewModel.UserImagePlaceholder) ); if (ViewModel.ShowImage) { PhotoImageView.SetImage( url: new NSUrl(ViewModel.ImageUrl), completionHandler: ((UIImage image, NSError error, SDImageCacheType cacheType, NSUrl imageUrl) => { ActivityIndicator.StopAnimating(); }) ); } else { PhotoImageView.Image = null; } if (ViewModel.ShowTimeline) { ContainerViewLeadingConstraint.Constant = _containerViewTimelineLeadingConstraint; TimelineView.Hidden = false; } else { ContainerViewLeadingConstraint.Constant = _containerViewDefaultLeadingConstraint; TimelineView.Hidden = true; } CommentButton.Hidden = !ViewModel.ShowCommentButton; ShareButton.Hidden = !ViewModel.ShowShareButton; // TODO: Remove this when we're ready to support sharing ShareButton.Hidden = true; }
void ReleaseDesignerOutlets() { if (BackButton != null) { BackButton.Dispose(); BackButton = null; } if (BottomConstraint != null) { BottomConstraint.Dispose(); BottomConstraint = null; } if (DistanceText != null) { DistanceText.Dispose(); DistanceText = null; } if (EditSelf != null) { EditSelf.Dispose(); EditSelf = null; } if (EditSelfBack != null) { EditSelfBack.Dispose(); EditSelfBack = null; } if (EditSelfHeader != null) { EditSelfHeader.Dispose(); EditSelfHeader = null; } if (EditSpacer != null) { EditSpacer.Dispose(); EditSpacer = null; } if (HeaderBackground != null) { HeaderBackground.Dispose(); HeaderBackground = null; } if (HideButton != null) { HideButton.Dispose(); HideButton = null; } if (LastActiveDate != null) { LastActiveDate.Dispose(); LastActiveDate = null; } if (LikeButton != null) { LikeButton.Dispose(); LikeButton = null; } if (LocationTime != null) { LocationTime.Dispose(); LocationTime = null; } if (MapBottomSeparator != null) { MapBottomSeparator.Dispose(); MapBottomSeparator = null; } if (MapSatellite != null) { MapSatellite.Dispose(); MapSatellite = null; } if (MapStreet != null) { MapStreet.Dispose(); MapStreet = null; } if (MapTopSeparator != null) { MapTopSeparator.Dispose(); MapTopSeparator = null; } if (MenuBlock != null) { MenuBlock.Dispose(); MenuBlock = null; } if (MenuContainer != null) { MenuContainer.Dispose(); MenuContainer = null; } if (MenuIcon != null) { MenuIcon.Dispose(); MenuIcon = null; } if (MenuLayer != null) { MenuLayer.Dispose(); MenuLayer = null; } if (MenuReport != null) { MenuReport.Dispose(); MenuReport = null; } if (Name != null) { Name.Dispose(); Name = null; } if (NavigationSpacer != null) { NavigationSpacer.Dispose(); NavigationSpacer = null; } if (NextButton != null) { NextButton.Dispose(); NextButton = null; } if (PercentProgress != null) { PercentProgress.Dispose(); PercentProgress = null; } if (PreviousButton != null) { PreviousButton.Dispose(); PreviousButton = null; } if (ProfileImageContainer != null) { ProfileImageContainer.Dispose(); ProfileImageContainer = null; } if (ProfileImageScroll != null) { ProfileImageScroll.Dispose(); ProfileImageScroll = null; } if (ProfileViewDescription != null) { ProfileViewDescription.Dispose(); ProfileViewDescription = null; } if (ProfileViewMap != null) { ProfileViewMap.Dispose(); ProfileViewMap = null; } if (ProfileViewScroll != null) { ProfileViewScroll.Dispose(); ProfileViewScroll = null; } if (RegisterDate != null) { RegisterDate.Dispose(); RegisterDate = null; } if (ResponseRate != null) { ResponseRate.Dispose(); ResponseRate = null; } if (RippleImageNext != null) { RippleImageNext.Dispose(); RippleImageNext = null; } if (RippleImagePrev != null) { RippleImagePrev.Dispose(); RippleImagePrev = null; } if (RippleProfileView != null) { RippleProfileView.Dispose(); RippleProfileView = null; } if (RoundBottom != null) { RoundBottom.Dispose(); RoundBottom = null; } if (ScrollBottomConstraint != null) { ScrollBottomConstraint.Dispose(); ScrollBottomConstraint = null; } if (SendLocation != null) { SendLocation.Dispose(); SendLocation = null; } if (Snackbar != null) { Snackbar.Dispose(); Snackbar = null; } if (SnackBottomConstraint != null) { SnackBottomConstraint.Dispose(); SnackBottomConstraint = null; } if (SnackTopConstraint != null) { SnackTopConstraint.Dispose(); SnackTopConstraint = null; } if (Username != null) { Username.Dispose(); Username = null; } if (ViewportConstraint != null) { ViewportConstraint.Dispose(); ViewportConstraint = null; } }