Hello everyone
Ok so I made a launcher and I want to implement patching for it so if the user is not on the right version then it will detect it and patch it. Here's the code I have currently
Also are my if statements are right? Also I tried to put a textbox to text the file reading but it didnt work I did the .ToString() at the end to so it looked like
Thanks everyone!
-Kevin
WebClient Client = new WebClient();
WebClient Server = new WebClient();
Client.DownloadFileAsync(new Uri("http://www.pytheria.com/Relapse/Patches/GameVersion.txt"), @"C:\Program Files (x86)\Pytheria\Relapse\Patches\GameVersion.txt");
Server.DownloadFileAsync(new Uri("http://www.pytheria.com/Relapse/Patches/LauncherVersion.txt"), @"C:\Program Files (x86)\Pytheria\Relapse\Patches\LauncherVersion.txt");
//Read text files//
GameVersion = System.IO.File.ReadAllText(@"C:\Program Files (x86)\Pytheria\Relapse\Patches\GameVersion.txt");
LauncherServerVersion = System.IO.File.ReadAllText(@"C:\Program Files (x86)\Pytheria\Relapse\Patches\LauncherVersion.txt");
if (LauncherClientVersion == LauncherServerVersion)
{
MessageBox.Show("Your Launcher is Up-To-Date!");
}
if (GameClientVersion == GameVersion)
{
MessageBox.Show("Your Game is Up-To-Date");
}
Also are my if statements are right? Also I tried to put a textbox to text the file reading but it didnt work I did the .ToString() at the end to so it looked like
txtbox1.text = GameVersion.ToString();
Thanks everyone!
-Kevin