Refactor code.

This commit is contained in:
2017-05-03 01:54:02 +01:00
parent 75ce95bab4
commit 9375231e12
9 changed files with 32 additions and 22 deletions

View File

@@ -1,3 +1,15 @@
2017-05-03 Natalia Portillo <claunia@claunia.com>
* Core.cs:
* SQLite.cs:
* DicCore.cs:
* Checksum.cs:
* PluginBase.cs:
* dlgMetadata.cs:
* dlgFilesystem.cs:
* dlgOpticalDisc.cs:
Refactor code.
2017-05-03 Natalia Portillo <claunia@claunia.com>
* MainWindow.cs:

View File

@@ -31,9 +31,9 @@
// ****************************************************************************/
using System.Collections.Generic;
using System.Threading;
using DiscImageChef.Checksums;
using Schemas;
using System.Threading;
namespace osrepodbmgr
{

View File

@@ -847,7 +847,6 @@ namespace osrepodbmgr
if(UpdateProgress != null)
UpdateProgress("Choosing files...", file, counter, MainClass.files.Count);
//FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read);
FileInfo fi = new FileInfo(file);
ZipEntry ze = zf.AddFile(file);

View File

@@ -26,15 +26,15 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
using System;
using DiscImageChef.Filters;
using Schemas;
using System.IO;
using System.Collections.Generic;
using System.IO;
using DiscImageChef.CommonTypes;
using DiscImageChef.Decoders.PCMCIA;
using DiscImageChef.Filesystems;
using DiscImageChef.Filters;
using DiscImageChef.ImagePlugins;
using DiscImageChef.PartPlugins;
using DiscImageChef.Filesystems;
using DiscImageChef.Decoders.PCMCIA;
using Schemas;
namespace osrepodbmgr
{
@@ -156,7 +156,7 @@ namespace osrepodbmgr
if(UpdateProgress2 != null)
UpdateProgress2(null, null, 0, 0);
switch(_imageFormat.ImageInfo.xmlMediaType)
{
case XmlMediaType.OpticalDisc:
@@ -549,7 +549,7 @@ namespace osrepodbmgr
}
if(UpdateProgress != null)
UpdateProgress(null, "Checking filesystems", maxProgress-1, maxProgress);
UpdateProgress(null, "Checking filesystems", maxProgress - 1, maxProgress);
List<Partition> partitions = new List<Partition>();
@@ -721,7 +721,7 @@ namespace osrepodbmgr
currentProgress++;
if(UpdateProgress != null)
UpdateProgress(null, string.Format("Hashing file containing {0}", tagType), currentProgress, maxProgress);
switch(tagType)
{
case MediaTagType.ATAPI_IDENTIFY:
@@ -931,7 +931,7 @@ namespace osrepodbmgr
}
catch(Exception ex)
{
if(Failed!=null)
if(Failed != null)
Failed(string.Format("Error reading file: {0}\n{1}", ex.Message, ex.StackTrace));
}
}

View File

@@ -31,10 +31,10 @@
// ****************************************************************************/
using System;
using System.Collections.Generic;
using DiscImageChef.Filesystems;
using DiscImageChef.PartPlugins;
using DiscImageChef.ImagePlugins;
using System.Reflection;
using DiscImageChef.Filesystems;
using DiscImageChef.ImagePlugins;
using DiscImageChef.PartPlugins;
namespace osrepodbmgr
{

View File

@@ -134,7 +134,7 @@ namespace osrepodbmgr
public override long LastInsertRowId
{
get { return dbCon.LastInsertRowId;}
get { return dbCon.LastInsertRowId; }
}
#endregion

View File

@@ -30,13 +30,13 @@ using Gtk;
using Schemas;
namespace osrepodbmgr
{
public partial class dlgFilesystem : Gtk.Dialog
public partial class dlgFilesystem : Dialog
{
public FileSystemType Metadata;
public dlgFilesystem()
{
this.Build();
Build();
}
public void FillFields()

View File

@@ -30,7 +30,6 @@ using System.Collections.Generic;
using System.Threading;
using Gtk;
using Schemas;
using System.Runtime.InteropServices;
namespace osrepodbmgr
{

View File

@@ -26,13 +26,13 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
using System;
using Schemas;
using Gtk;
using System.Collections.Generic;
using Gtk;
using Schemas;
namespace osrepodbmgr
{
public partial class dlgOpticalDisc : Gtk.Dialog
public partial class dlgOpticalDisc : Dialog
{
public OpticalDiscType Metadata;
@@ -83,7 +83,7 @@ namespace osrepodbmgr
public dlgOpticalDisc()
{
this.Build();
Build();
#region Set partitions table
CellRendererText partSequenceCell = new CellRendererText();