|
@@ -1,11 +1,9 @@
|
|
using System;
|
|
using System;
|
|
-using System.Collections.Generic;
|
|
|
|
using System.IO;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using InABox.Clients;
|
|
using InABox.Clients;
|
|
using InABox.Core;
|
|
using InABox.Core;
|
|
using InABox.Mobile;
|
|
using InABox.Mobile;
|
|
-using JetBrains.Annotations;
|
|
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms;
|
|
|
|
|
|
namespace PRS.Mobile
|
|
namespace PRS.Mobile
|
|
@@ -28,13 +26,13 @@ namespace PRS.Mobile
|
|
|
|
|
|
public partial class ImageViewerPage
|
|
public partial class ImageViewerPage
|
|
{
|
|
{
|
|
- [CanBeNull] private Action _deleteaction = null;
|
|
|
|
|
|
+ private readonly Action? _deleteaction;
|
|
|
|
|
|
- private Document _doc;
|
|
|
|
|
|
+ private Document? _doc;
|
|
|
|
|
|
- public event ImageViewerPageImageChangedEvent ImageChanged;
|
|
|
|
|
|
+ public event ImageViewerPageImageChangedEvent? ImageChanged;
|
|
|
|
|
|
- public ImageViewerPage(ImageSource image, Action ondelete)
|
|
|
|
|
|
+ public ImageViewerPage(ImageSource image, Action? ondelete)
|
|
{
|
|
{
|
|
InitializeComponent();
|
|
InitializeComponent();
|
|
BindingContext = image;
|
|
BindingContext = image;
|
|
@@ -42,7 +40,7 @@ namespace PRS.Mobile
|
|
_delete.IsVisible = ondelete != null;
|
|
_delete.IsVisible = ondelete != null;
|
|
}
|
|
}
|
|
|
|
|
|
- public ImageViewerPage(byte[] data, Action ondelete)
|
|
|
|
|
|
+ public ImageViewerPage(byte[] data, Action? ondelete)
|
|
{
|
|
{
|
|
InitializeComponent();
|
|
InitializeComponent();
|
|
BindingContext = ImageSource.FromStream(() => new MemoryStream(data));
|
|
BindingContext = ImageSource.FromStream(() => new MemoryStream(data));
|
|
@@ -53,9 +51,9 @@ namespace PRS.Mobile
|
|
public ImageViewerPage(Guid id)
|
|
public ImageViewerPage(Guid id)
|
|
{
|
|
{
|
|
InitializeComponent();
|
|
InitializeComponent();
|
|
- new Client<Document>().Query(
|
|
|
|
|
|
+ Client.Query(
|
|
new Filter<Document>(x => x.ID).IsEqualTo(id),
|
|
new Filter<Document>(x => x.ID).IsEqualTo(id),
|
|
- null,
|
|
|
|
|
|
+ Columns.All<Document>(),
|
|
null,
|
|
null,
|
|
(o, e) =>
|
|
(o, e) =>
|
|
{
|
|
{
|
|
@@ -82,7 +80,7 @@ namespace PRS.Mobile
|
|
{
|
|
{
|
|
if (_doc == null)
|
|
if (_doc == null)
|
|
return;
|
|
return;
|
|
- _doc.Data = MobileUtils.ImageTools.RotateImage(_doc.Data,90F,100);
|
|
|
|
|
|
+ _doc.Data = MobileUtils.ImageTools.RotateImage(_doc.Data,90F);
|
|
_doc.CRC = CoreUtils.CalculateCRC(_doc.Data);
|
|
_doc.CRC = CoreUtils.CalculateCRC(_doc.Data);
|
|
var msg = "Image Rotated on Mobile Device";
|
|
var msg = "Image Rotated on Mobile Device";
|
|
new Client<Document>().Save(_doc, msg);
|
|
new Client<Document>().Save(_doc, msg);
|