removed public getter methods, using properties instead
This commit is contained in:
parent
2042a829da
commit
a4f060debe
|
@ -55,28 +55,28 @@ namespace EZPPClient_Installer
|
|||
MessageBox.Show("Folder does not exist: " + pathToEZPP);
|
||||
#endif
|
||||
foreach (MD5File md5File in md5Files)
|
||||
downloadList.Add(md5File.getName());
|
||||
downloadList.Add(md5File.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (MD5File md5file in md5Files)
|
||||
{
|
||||
string file = pathToEZPP + @"\" + md5file.getName();
|
||||
string file = pathToEZPP + @"\" + md5file.Name;
|
||||
bool doesExistOnPC = File.Exists(file);
|
||||
if (!doesExistOnPC)
|
||||
{
|
||||
downloadList.Add(md5file.getName());
|
||||
downloadList.Add(md5file.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
string onlineHash = md5file.getMD5();
|
||||
string onlineHash = md5file.MD5;
|
||||
string pcHash = MD5Util.CalculateMD5(file);
|
||||
#if DEBUG
|
||||
MessageBox.Show("Filename: " + md5file.getName() + "\nOnline-Hash: " + onlineHash + "\n PC-Hash: " + pcHash);
|
||||
#endif
|
||||
if (!string.Equals(onlineHash, pcHash))
|
||||
{
|
||||
downloadList.Add(md5file.getName());
|
||||
downloadList.Add(md5file.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,24 +10,14 @@ namespace EZPPClient_Installer
|
|||
class MD5File
|
||||
{
|
||||
|
||||
private string md5;
|
||||
private string name;
|
||||
public string MD5 { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public MD5File(string name, string md5)
|
||||
{
|
||||
this.md5 = md5;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public string getMD5()
|
||||
{
|
||||
return md5;
|
||||
}
|
||||
|
||||
this.MD5 = md5;
|
||||
this.Name = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user