@@ -57,11 +57,11 @@ namespace ROMVault2
|
||||
|
||||
private static string clean(string s)
|
||||
{
|
||||
s = s.Replace("&", "&");
|
||||
s = s.Replace("\"", """);
|
||||
s = s.Replace("'", "'");
|
||||
s = s.Replace("<", "<");
|
||||
s = s.Replace(">", ">");
|
||||
s = s.Replace("&", "&");
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace ROMVault2
|
||||
{
|
||||
ShowNewFolderButton = true,
|
||||
Description = Resources.FrmSetDir_BtnSetRomLocationClick_Please_select_a_folder_for_This_Rom_Set,
|
||||
RootFolder = (Settings.IsMono ? Environment.SpecialFolder.MyComputer : Environment.SpecialFolder.DesktopDirectory),
|
||||
RootFolder = Environment.SpecialFolder.MyComputer,
|
||||
SelectedPath = DBHelper.GetRealPath(_datLocation)
|
||||
};
|
||||
if (browse.ShowDialog() == DialogResult.OK)
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace ROMVault2
|
||||
{
|
||||
ShowNewFolderButton = true,
|
||||
Description = Resources.FrmSettings_BtnDatClick_Please_select_a_folder_for_DAT_Root,
|
||||
RootFolder = (Settings.IsMono ? Environment.SpecialFolder.MyComputer : Environment.SpecialFolder.DesktopDirectory),
|
||||
RootFolder = Environment.SpecialFolder.MyComputer,
|
||||
SelectedPath = Settings.DatRoot
|
||||
};
|
||||
|
||||
|
||||
@@ -15,10 +15,7 @@ namespace ROMVault2
|
||||
//public static UsernamePassword Up;
|
||||
public static readonly Encoding Enc = Encoding.GetEncoding(28591);
|
||||
public const string Version = "2.2";
|
||||
public const int SubVersion = 3;
|
||||
|
||||
public static string ErrorMessage;
|
||||
public static string URL;
|
||||
public const int SubVersion = 4;
|
||||
|
||||
public static SynchronizationContext SyncCont;
|
||||
|
||||
@@ -40,14 +37,6 @@ namespace ROMVault2
|
||||
|
||||
progress.Dispose();
|
||||
|
||||
if (!String.IsNullOrEmpty(ErrorMessage))
|
||||
{
|
||||
MessageBox.Show(ErrorMessage);
|
||||
if (!String.IsNullOrEmpty(URL))
|
||||
System.Diagnostics.Process.Start(URL);
|
||||
return;
|
||||
}
|
||||
|
||||
Application.Run(new FrmMain());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace ROMVault2
|
||||
{
|
||||
ShowNewFolderButton = true,
|
||||
Description = @"Please select a folder for Dats",
|
||||
RootFolder = (Settings.IsMono ? Environment.SpecialFolder.MyComputer : Environment.SpecialFolder.DesktopDirectory),
|
||||
SelectedPath = @"apps"
|
||||
RootFolder = Environment.SpecialFolder.MyComputer,
|
||||
SelectedPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Reports")
|
||||
};
|
||||
|
||||
if (browse.ShowDialog() != DialogResult.OK) return;
|
||||
|
||||
@@ -26,11 +26,7 @@ namespace ROMVault2.SupportedFiles.Files
|
||||
bSHA1 = null;
|
||||
crc = null;
|
||||
|
||||
Stream ds;
|
||||
int errorCode = IO.FileStream.OpenFileRead(filename, out ds);
|
||||
if (errorCode != 0)
|
||||
return errorCode;
|
||||
|
||||
Stream ds=null;
|
||||
CRC32Hash crc32 = new CRC32Hash();
|
||||
|
||||
MD5 md5 = null;
|
||||
@@ -38,6 +34,12 @@ namespace ROMVault2.SupportedFiles.Files
|
||||
SHA1 sha1 = null;
|
||||
if (testDeep) sha1 = SHA1.Create();
|
||||
|
||||
try
|
||||
{
|
||||
int errorCode = IO.FileStream.OpenFileRead(filename, out ds);
|
||||
if (errorCode != 0)
|
||||
return errorCode;
|
||||
|
||||
long sizetogo = ds.Length;
|
||||
|
||||
while (sizetogo > 0)
|
||||
@@ -56,6 +58,15 @@ namespace ROMVault2.SupportedFiles.Files
|
||||
if (testDeep) sha1.TransformFinalBlock(Buffer, 0, 0);
|
||||
|
||||
ds.Close();
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (ds != null)
|
||||
ds.Close();
|
||||
|
||||
return 0x17;
|
||||
}
|
||||
|
||||
|
||||
crc = crc32.Hash;
|
||||
if (testDeep) bMD5 = md5.Hash;
|
||||
|
||||
@@ -11,9 +11,6 @@ namespace ROMVault2
|
||||
{
|
||||
public static class rvImages
|
||||
{
|
||||
private static List<string> names;
|
||||
private static List<Bitmap> images;
|
||||
|
||||
|
||||
public static Bitmap GetBitmap(string bitmapName)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user