diff --git a/.idea/.idea.DiscImageChef/.idea/contentModel.xml b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
index e5c3818e3..b77ee138a 100644
--- a/.idea/.idea.DiscImageChef/.idea/contentModel.xml
+++ b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
@@ -1623,6 +1623,8 @@
+
+
diff --git a/DiscImageChef.Gui/Forms/frmImageVerify.xeto b/DiscImageChef.Gui/Forms/frmImageVerify.xeto
new file mode 100644
index 000000000..4bed4c106
--- /dev/null
+++ b/DiscImageChef.Gui/Forms/frmImageVerify.xeto
@@ -0,0 +1,101 @@
+
+
\ No newline at end of file
diff --git a/DiscImageChef.Gui/Forms/frmImageVerify.xeto.cs b/DiscImageChef.Gui/Forms/frmImageVerify.xeto.cs
new file mode 100644
index 000000000..4fc5403c1
--- /dev/null
+++ b/DiscImageChef.Gui/Forms/frmImageVerify.xeto.cs
@@ -0,0 +1,418 @@
+// /***************************************************************************
+// The Disc Image Chef
+// ----------------------------------------------------------------------------
+//
+// Filename : frmImageVerify.xeto.cs
+// Author(s) : Natalia Portillo
+//
+// Component : Image entropy calculation window.
+//
+// --[ Description ] ----------------------------------------------------------
+//
+// Implements verifying media image.
+//
+// --[ 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 © 2011-2018 Natalia Portillo
+// ****************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using DiscImageChef.CommonTypes.Interfaces;
+using DiscImageChef.CommonTypes.Structs;
+using DiscImageChef.Console;
+using DiscImageChef.Core;
+using Eto.Forms;
+using Eto.Serialization.Xaml;
+
+namespace DiscImageChef.Gui.Forms
+{
+ public class frmImageVerify : Form
+ {
+ bool cancel;
+ IMediaImage inputFormat;
+
+ public frmImageVerify(IMediaImage inputFormat)
+ {
+ this.inputFormat = inputFormat;
+ XamlReader.Load(this);
+ cancel = false;
+ }
+
+ protected void OnBtnStart(object sender, EventArgs e)
+ {
+ chkVerifyImage.Enabled = false;
+ chkVerifySectors.Enabled = false;
+ btnClose.Visible = false;
+ btnStart.Visible = false;
+ btnStop.Visible = true;
+ stkProgress.Visible = true;
+ lblProgress2.Visible = false;
+
+ new Thread(DoWork).Start();
+ }
+
+ void DoWork()
+ {
+ bool? correctDisc = null;
+ long totalSectors = 0;
+ long errorSectors = 0;
+ long correctSectors = 0;
+ long unknownSectors = 0;
+ bool formatHasTracks;
+
+ try { formatHasTracks = inputFormat.Tracks?.Count > 0; }
+ catch { formatHasTracks = false; }
+
+ // Setup progress bars
+ Application.Instance.Invoke(() =>
+ {
+ stkProgress.Visible = true;
+ prgProgress.MaxValue = 0;
+
+ if(chkVerifyImage.Checked == true || chkVerifySectors.Checked == true) prgProgress.MaxValue = 1;
+
+ if(formatHasTracks) prgProgress.MaxValue += inputFormat.Tracks.Count;
+ else
+ {
+ if(chkVerifySectors.Checked == true)
+ {
+ prgProgress.MaxValue = 2;
+ prgProgress2.Visible = false;
+ lblProgress2.Visible = false;
+ }
+ else
+ {
+ prgProgress2.Visible = true;
+ lblProgress2.Visible = true;
+ }
+ }
+
+ prgProgress.MaxValue++;
+ });
+
+ if(chkVerifyImage.Checked == true)
+ {
+ Application.Instance.Invoke(() =>
+ {
+ lblProgress.Text = "Checking media image...";
+ if(chkVerifySectors.Checked == true) prgProgress.Value = 1;
+ else prgProgress.Indeterminate = true;
+
+ prgProgress2.Indeterminate = true;
+ });
+
+ DateTime startCheck = DateTime.UtcNow;
+ bool? discCheckStatus = inputFormat.VerifyMediaImage();
+ DateTime endCheck = DateTime.UtcNow;
+
+ TimeSpan checkTime = endCheck - startCheck;
+
+ Application.Instance.Invoke(() =>
+ {
+ lblImageResult.Visible = true;
+ switch(discCheckStatus)
+ {
+ case true:
+ lblImageResult.Text = "Disc image checksums are correct";
+ break;
+ case false:
+ lblImageResult.Text = "Disc image checksums are incorrect";
+ break;
+ case null:
+ lblImageResult.Text = "Disc image does not contain checksums";
+ break;
+ }
+ });
+
+ correctDisc = discCheckStatus;
+ DicConsole.VerboseWriteLine("Checking disc image checksums took {0} seconds", checkTime.TotalSeconds);
+ }
+
+ if(chkVerifySectors.Checked == true)
+ {
+ DateTime startCheck;
+ DateTime endCheck;
+ List failingLbas = new List();
+ List unknownLbas = new List();
+
+ Application.Instance.Invoke(() =>
+ {
+ lblProgress2.Visible = true;
+ prgProgress2.Indeterminate = false;
+ prgProgress2.MaxValue = (int)(inputFormat.Info.Sectors / 512);
+ btnStop.Enabled = true;
+ });
+
+ if(formatHasTracks)
+ {
+ List