|
@@ -1,29 +0,0 @@
|
|
|
-using System;
|
|
|
-using System.IO;
|
|
|
-using System.Linq;
|
|
|
-using InABox.Core;
|
|
|
-using InABox.Mobile;
|
|
|
-using Xamarin.Forms;
|
|
|
-
|
|
|
-namespace PRS.Mobile
|
|
|
-{
|
|
|
- public class DigitalFormDocumentShell : Shell<DigitalFormModel, DigitalFormDocument>, IDocumentShell
|
|
|
- {
|
|
|
- protected override void ConfigureColumns(ShellColumns<DigitalFormModel, DigitalFormDocument> columns)
|
|
|
- {
|
|
|
- columns
|
|
|
- .Map(nameof(EntityID), x => x.EntityLink.ID)
|
|
|
- .Map(nameof(FileName), x => x.DocumentLink.FileName)
|
|
|
- .Map(nameof(_thumbnail), x => x.Thumbnail);
|
|
|
- }
|
|
|
-
|
|
|
- public Guid EntityID => Get<Guid>();
|
|
|
-
|
|
|
- public String FileName => Get<String>();
|
|
|
-
|
|
|
- private byte[] _thumbnail => Get<byte[]>();
|
|
|
- public ImageSource Thumbnail => ImageSource.FromStream(() => new MemoryStream(_thumbnail));
|
|
|
-
|
|
|
- public DigitalFormShell Form => Parent.Items.FirstOrDefault(x => Guid.Equals(x.ID, ID));
|
|
|
- }
|
|
|
-}
|