public VenueInfo(Bobs.Venue venue) { this.name = venue.Name; this.k = venue.K; this.place = new PlaceInfo(venue.Place); this.url = venue.Url(); this.picPath = venue.AnyPicPath; }
public EventInfo(Bobs.Event e) { this.name = e.Name; this.k = e.K; this.date = e.DateTime; this.venueInfo = new VenueInfo(e.Venue); this.url = e.Url(); this.picPath = e.AnyPicPath; }
public static Dictionary<string, string> GetDataItem(Bobs.Gallery g) { return new Dictionary<string, string>() { {Columns.Name.ToString(), g.Name}, {Columns.Url.ToString(), g.Url()}, {Columns.PicPath.ToString(), g.PicPath}, {Columns.OwnerUrl.ToString(), g.Owner.Url()}, {Columns.OwnerRollover.ToString(), g.Owner.Rollover}, {Columns.OwnerNickNameSafe.ToString(), g.Owner.NickName}, {Columns.PagedUrl.ToString(), g.PagedUrl()}, {Columns.EventName.ToString(), g.Event.Name}, {Columns.EventUrl.ToString(), g.Event.Url()}, {Columns.VenueName.ToString(), g.Event.Venue.Name}, {Columns.VenueUrl.ToString(), g.Event.Venue.Url()}, {Columns.Date.ToString(), Cambro.Misc.Utility.FriendlyDate(g.Event.DateTime.Date)}, {Columns.LivePhotos.ToString(), g.LivePhotos.ToString()}, }; }
private PhotoStub CreatePhotoStub(Bobs.Photo photo, bool includeEventInfo) { return new PhotoStub() { k = photo.K, url = photo.Url(), iconPath = photo.IconPath, webPath = photo.WebPath, thumbPath = photo.ThumbPath, thumbWidth = (int)(photo.ThumbWidth), thumbHeight = (int)(photo.ThumbHeight), width = (int)(photo.WebWidth), height = (int)(photo.WebHeight), takenByDetailsHtml = photo.TakenByDetailsHtml(includeEventInfo), usrLink = photo.Usr.Link(), isPhoto = photo.IsPhoto, isVideo = photo.IsVideo, usrsInPhotoHtml = photo.UsrsInPhotoHtml, usrIsInPhoto = Usr.Current != null ? photo.UsrsInPhoto.FindFirstIndex(u => u.K == Usr.Current.K).HasValue : false, rolloverMouseOverText = photo.RolloverMouseOverText, linkToPhotoUrl = photo.Link, embedThisPhotoHtml = photo.EmbedHtml, photoVideoLabel = photo.PhotoVideoLabel, quickBrowserUrl = photo.QuickBrowserUrl, downloadPhotoLinkHtml = photo.DownloadPhotoLinkHtml, videoMedWidth = photo.VideoMedWidth, videoMedHeight = photo.VideoMedHeight, videoMedPath = photo.VideoMedPath, isFavourite = photo.IsFavourite, isInCompetitionGroup = photo.IsInCompetitionGroup, canEnterCompetition = photo.CanEnterCompetition, photoUsageAdminString = Usr.Current != null && Usr.Current.IsAdmin ? photo.Usr.PhotoUsageAdminString : "", chatRoomGuid = new Chat.RoomSpec(SpottedScript.Controls.ChatClient.Shared.RoomType.Normal, Model.Entities.ObjectType.Photo, photo.K).Guid.Pack(), threadK = photo.ThreadK ?? 0, commentsCount = photo.ThreadK > 0 && photo.Thread != null ? photo.Thread.TotalComments : 0 }; }