Skip to content

Commit

Permalink
Fixed Updater function that did not work on Windows in other language…
Browse files Browse the repository at this point in the history
…s except German
  • Loading branch information
UndertakerBen committed Apr 29, 2020
1 parent a6cd121 commit a029030
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 10 additions & 7 deletions Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public Form1()
}
}
}
CheckLauncher();
}
private async void Button1_Click(object sender, EventArgs e)
{
Expand Down Expand Up @@ -952,10 +953,10 @@ void LaterButton_Click(object sender, EventArgs e)
var response = request.GetResponse();
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
var version = reader.ReadToEnd();
versionLabel.Text = version;
var version = reader.ReadToEnd();
FileVersionInfo testm = FileVersionInfo.GetVersionInfo(applicationPath + "\\Portable Chrome Updater.exe");
if (Convert.ToDecimal(version) > Convert.ToDecimal(testm.FileVersion))
versionLabel.Text = testm.FileVersion + " >>> " + version;
if (version != testm.FileVersion)
{
Controls.Add(groupBoxupdate);
groupBox3.Enabled = false;
Expand All @@ -965,7 +966,7 @@ void LaterButton_Click(object sender, EventArgs e)
}
catch (Exception)
{

}
void UpdateButton_Click(object sender, EventArgs e)
{
Expand Down Expand Up @@ -997,6 +998,9 @@ void UpdateButton_Click(object sender, EventArgs e)
Close();
}
}
}
private void CheckLauncher()
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
try
{
Expand All @@ -1005,9 +1009,8 @@ void UpdateButton_Click(object sender, EventArgs e)
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
var version = reader.ReadToEnd();
versionLabel.Text = version;
FileVersionInfo testm = FileVersionInfo.GetVersionInfo(applicationPath + "\\Bin\\Launcher\\Chrome Launcher.exe");
if (Convert.ToDecimal(version) > Convert.ToDecimal(testm.FileVersion))
if (version != testm.FileVersion)
{
reader.Close();
try
Expand Down Expand Up @@ -1049,5 +1052,5 @@ void UpdateButton_Click(object sender, EventArgs e)

}
}
}
}
}
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.5.1")]
[assembly: AssemblyFileVersion("1.2.5.1")]
[assembly: AssemblyVersion("1.2.5.2")]
[assembly: AssemblyFileVersion("1.2.5.2")]
2 changes: 1 addition & 1 deletion Version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.5.1
1.2.5.2

0 comments on commit a029030

Please sign in to comment.