mirror of
https://github.com/abdelkader/vCardEditor
synced 2025-12-12 08:27:19 +07:00
refactor
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
0.5.4
|
||||
Fix a regression when saving Phones, Website, Email
|
||||
added the update button in the about dialog to check the latest version.
|
||||
|
||||
0.5.3
|
||||
Support of QR Code.
|
||||
|
||||
|
||||
@@ -107,15 +107,11 @@ namespace vCardEditor.View
|
||||
|
||||
private async void updateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string url = ConfigRepository.Instance.VersionUrl;
|
||||
|
||||
try
|
||||
{
|
||||
using (var client = new System.Net.WebClient())
|
||||
{
|
||||
string result = await client.DownloadStringTaskAsync(url);
|
||||
if (result.Length > 0)
|
||||
using (var client = new WebClient())
|
||||
{
|
||||
string result = await client.DownloadStringTaskAsync(ConfigRepository.Instance.VersionUrl);
|
||||
using (var reader = new StringReader(result))
|
||||
{
|
||||
string InternetVersion = reader.ReadLine();
|
||||
@@ -124,15 +120,11 @@ namespace vCardEditor.View
|
||||
Version v2 = new Version(AssemblyVersion);
|
||||
|
||||
if (v1.CompareTo(v2) > 0)
|
||||
MessageBox.Show(String.Format("New version {0} found!", result));
|
||||
MessageBox.Show(string.Format("New version {0} found!", result), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
else
|
||||
MessageBox.Show("You have the latest version!");
|
||||
MessageBox.Show("You have the latest version!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (WebException )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user