mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 11:04:25 +00:00
Add base scan view model.
This commit is contained in:
@@ -109,6 +109,21 @@ namespace Marechai.Helpers
|
||||
model.WhiteBalance = WhiteBalance;
|
||||
model.Comments = Description;
|
||||
}
|
||||
|
||||
public void ToViewModel(BaseScanViewModel model)
|
||||
{
|
||||
model.ScannerManufacturer = Make;
|
||||
model.ScannerModel = Model;
|
||||
model.Author = Author;
|
||||
model.CreationDate = DateTimeOriginal ?? CreateDate ?? ModifyDate;
|
||||
model.ExifVersion = ExifVersion;
|
||||
model.HorizontalResolution = XResolution;
|
||||
model.SoftwareUsed = Software;
|
||||
model.VerticalResolution = YResolution;
|
||||
model.ColorSpace = ColorSpace;
|
||||
model.ResolutionUnit = ResolutionUnit;
|
||||
model.Comments = Description;
|
||||
}
|
||||
}
|
||||
|
||||
internal class ExiftoolDateConverter : JsonConverter<DateTime?>
|
||||
|
||||
48
Marechai/ViewModels/BaseScanViewModel.cs
Normal file
48
Marechai/ViewModels/BaseScanViewModel.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System;
|
||||
using Marechai.Database;
|
||||
|
||||
namespace Marechai.ViewModels
|
||||
{
|
||||
public class BaseScanViewModel : BaseViewModel<Guid>
|
||||
{
|
||||
public string Author { get; set; }
|
||||
public ColorSpace? ColorSpace { get; set; }
|
||||
public string Comments { get; set; }
|
||||
public DateTime? CreationDate { get; set; }
|
||||
public string ExifVersion { get; set; }
|
||||
public double? HorizontalResolution { get; set; }
|
||||
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||
public string ScannerManufacturer { get; set; }
|
||||
public string ScannerModel { get; set; }
|
||||
public string SoftwareUsed { get; set; }
|
||||
public DateTime UploadDate { get; set; }
|
||||
public double? VerticalResolution { get; set; }
|
||||
public string OriginalExtension { get; set; }
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
}
|
||||
35
Marechai/ViewModels/DocumentScanBaseViewModel.cs
Normal file
35
Marechai/ViewModels/DocumentScanBaseViewModel.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using Marechai.Database;
|
||||
|
||||
namespace Marechai.ViewModels
|
||||
{
|
||||
public class DocumentScanBaseViewModel : BaseScanViewModel
|
||||
{
|
||||
public DocumentScanType Type { get; set; }
|
||||
public uint? Page { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user