Skip to content

Commit

Permalink
Check For Update Feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Sk1ffy authored and Sk1ffy committed May 31, 2024
1 parent e938b31 commit d5ad43e
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion RLOrbital/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Diagnostics;
using System.Diagnostics.Eventing.Reader;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using static System.Net.WebRequestMethods;
Expand All @@ -16,7 +17,7 @@ namespace Orbital_V1._0
public partial class Form1 : Form
{


public string version = "1.0.8";
public Form1()
{
InitializeComponent();
Expand Down Expand Up @@ -746,6 +747,38 @@ private string ExtractUserInfo(string file)
}
private void Form1_Load(object sender, EventArgs e)
{
//Check for Updates
try
{
using (WebClient client = new WebClient())
{
string htmlCode = client.DownloadString("https://raw.githubusercontent.com/SkiffyMan/OrbitalUpdater.github.io/main/version.txt");

if(htmlCode == version)
{

}
else
{
DialogResult response = MessageBox.Show("New update is available. Would you like to update?",
"Update found", MessageBoxButtons.YesNo);
if (response == DialogResult.Yes)
{
OpenBrowser("https://github.com/SkiffyMan/RLOrbital/releases");
}

}
}

}
catch(Exception z)
{
MessageBox.Show("Failed to check for updates....");
}




ToggleKeySetLoad();

//GET AND LOAD ALL USER ACCOUNTS
Expand Down

0 comments on commit d5ad43e

Please sign in to comment.