[Logger] Logging cleanup across the board

This commit is contained in:
Matt Nadareski
2016-07-12 10:42:29 -07:00
parent 1f7206ad75
commit 4c16ce4a2d
5 changed files with 41 additions and 19 deletions

View File

@@ -22,6 +22,11 @@ namespace SabreTools.Helper
public int CompareTo(object obj)
{
Logger temp = new Logger(false, "");
temp.Start();
int ret = 0;
try
{
Rom comp = (Rom)obj;
@@ -30,23 +35,31 @@ namespace SabreTools.Helper
{
if (this.Name == comp.Name)
{
return (RomTools.IsDuplicate(this, comp) ? 0 : 1);
ret = (RomTools.IsDuplicate(this, comp, temp) ? 0 : 1);
}
return String.Compare(this.Name, comp.Name);
ret = String.Compare(this.Name, comp.Name);
}
return String.Compare(this.Game, comp.Game);
ret = String.Compare(this.Game, comp.Game);
}
catch
{
return 1;
ret = 1;
}
temp.Close();
return ret;
}
public bool Equals(Rom other)
{
Logger temp = new Logger(false, "");
temp.Start();
bool isdupe = RomTools.IsDuplicate(this, other, temp);
temp.Close();
return (this.Game == other.Game &&
this.Name == other.Name &&
RomTools.IsDuplicate(this, other));
isdupe);
}
}