public override TransitPicture GetRandomPictureWithThumbnail() { SnCore.Services.TransitPicture p = SessionManager.GetInstance <SnCore.Services.TransitPicture, string>( "AccountStory", SessionManager.ObjectService.GetRandomPictureByType); if (p == null) { return(null); } TransitPicture result = new TransitPicture(); result.Id = p.Id; result.Bitmap = p.Thumbnail; result.Created = p.Created; result.Modified = p.Modified; result.Name = p.Name; return(result); }
public override TransitPicture GetPictureWithThumbnail(int id) { SnCore.Services.TransitPicture p = SessionManager.GetInstance <SnCore.Services.TransitPicture, int>( id, SessionManager.ObjectService.GetPictureById); if (p == null) { return(null); } TransitPicture result = new TransitPicture(); result.Id = p.Id; result.Bitmap = p.Thumbnail; result.Created = p.Created; result.Modified = p.Modified; result.Name = p.Name; return(result); }
public override TransitPicture GetPictureWithBitmap(int id, DateTime ifModifiedSince) { SnCore.Services.TransitPicture p = SessionManager.GetInstance <SnCore.Services.TransitPicture, int, DateTime>( id, ifModifiedSince, SessionManager.ObjectService.GetPictureIfModifiedSinceById); if (p == null) { return(null); } TransitPicture result = new TransitPicture(); result.Id = p.Id; result.Bitmap = p.Bitmap; result.Created = p.Created; result.Modified = p.Modified; result.Name = p.Name; return(result); }
public override PicturePage.TransitPicture GetRandomPictureWithThumbnail() { SnCore.Services.TransitPicture p = SessionManager.GetInstance <SnCore.Services.TransitPicture, string>( "AccountWebsite", SessionManager.ObjectService.GetRandomPictureByType); if (p == null || p.Bitmap == null) { p = new SnCore.Services.TransitPicture(); const string s_Unavailable = "Thumbnail\nQueued"; // flip the bitmaps horizontally p.Bitmap = ThumbnailBitmap.GetBitmapDataFromText(s_Unavailable, 10, ThumbnailBitmap.s_FullSize.Height, ThumbnailBitmap.s_FullSize.Width); p.Thumbnail = ThumbnailBitmap.GetBitmapDataFromText(s_Unavailable, 10, ThumbnailBitmap.s_ThumbnailSize.Height, ThumbnailBitmap.s_ThumbnailSize.Width); p.Created = p.Modified = DateTime.UtcNow; } TransitPicture result = new TransitPicture(); result.Id = p.Id; result.Bitmap = p.Thumbnail; result.Created = p.Created; result.Modified = p.Modified; result.Name = p.Name; return(result); }
public override PicturePage.TransitPicture GetRandomPictureWithThumbnail() { SnCore.Services.TransitPicture p = SessionManager.GetInstance<SnCore.Services.TransitPicture, string>( "PlaceWebsite", SessionManager.ObjectService.GetRandomPictureByType); if (p == null || p.Bitmap == null) { p = new SnCore.Services.TransitPicture(); const string s_Unavailable = "Thumbnail\nQueued"; // flip the bitmaps horizontally p.Bitmap = ThumbnailBitmap.GetBitmapDataFromText(s_Unavailable, 10, ThumbnailBitmap.s_FullSize.Height, ThumbnailBitmap.s_FullSize.Width); p.Thumbnail = ThumbnailBitmap.GetBitmapDataFromText(s_Unavailable, 10, ThumbnailBitmap.s_ThumbnailSize.Height, ThumbnailBitmap.s_ThumbnailSize.Width); p.Created = p.Modified = DateTime.UtcNow; } TransitPicture result = new TransitPicture(); result.Id = p.Id; result.Bitmap = p.Thumbnail; result.Created = p.Created; result.Modified = p.Modified; result.Name = p.Name; return result; }