Removed loading screen image crap

This commit is contained in:
Bob Da Ross
2021-06-18 23:27:34 -05:00
parent 5d489f88b8
commit c7cecca148
4 changed files with 111 additions and 45 deletions

View File

@@ -2,6 +2,7 @@
using Sandbox.Graphics.GUI;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
@@ -21,7 +22,7 @@ namespace SeamlessClientPlugin.Utilities
public string PluginFolder;
public string CurrentVersion;
public bool DownloadUpdate;
private string GitHubAPILink = "https://api.github.com/repos/Casimir255/SeamlessClientPlugin/releases/latest";
private const string GitHubAPILink = "https://api.github.com/repos/Casimir255/SeamlessClientPlugin/releases/latest";
private WebClient Client;
@@ -35,6 +36,31 @@ namespace SeamlessClientPlugin.Utilities
DeleteOLDFiles();
}
private static void RestartClientAfterUpdate()
{
try
{
SeamlessClient.TryShow("Restarting Client!");
string exe = Assembly.GetEntryAssembly().Location;
Process currentProcess = Process.GetCurrentProcess();
string[] CommandArgs = Environment.GetCommandLineArgs();
string NewCommandLine = "";
for (int i = 1; i < CommandArgs.Length; i++)
{
NewCommandLine += " " + CommandArgs[i];
}
SeamlessClient.TryShow(NewCommandLine);
Process.Start(exe, NewCommandLine);
currentProcess.Kill();
}
catch
{
SeamlessClient.TryShow("Restarting Client error!");
}
}
@@ -201,7 +227,7 @@ namespace SeamlessClientPlugin.Utilities
//Restart client
SeamlessClient.TryShow("UpdateComplete!");
SeamlessClient.RestartClientAfterUpdate();
RestartClientAfterUpdate();
return true;
}