static void Main(string[] args) { //Build App Data path and using Environment.Expand... string path = @"%appdata%\MSA\"; path = Environment.ExpandEnvironmentVariables(path); string fullpath = path + "TBRes.crk.config"; //Check if the file already exists in appdata, if not then download if (!File.Exists(fullpath)) { //Create folder & web downloader and pull file to path Directory.CreateDirectory(path); WebClient ResourceDownloader = new WebClient(); ResourceDownloader.DownloadFile("http://www.meritsoftware.co.uk/YearEnd2021_Config_vals.csv", fullpath); //Strip additional data from file string[] lines = File.ReadAllLines(fullpath); File.WriteAllLines(fullpath, lines.Take(lines.Count() - 78)); } Updater.GitHubRepo = "/Crackhouse2/MeritSupportAid"; if (Updater.AutoUpdate(args)) { return; } try { threadComEvent = EventWaitHandle.OpenExisting(SingleInst); threadComEvent.Set(); threadComEvent.Close(); return; //You're outta here!!! } catch { /* Carry on*/ } //event handle threadComEvent = new EventWaitHandle(false, EventResetMode.AutoReset, SingleInst); CreateInterAppComThread(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MSA()); singleAppComThread.CancelAsync(); while (singleAppComThread.IsBusy) { Thread.Sleep(50); } threadComEvent.Close(); }
static void Main(string[] args) { Updater.GitHubRepo = "/MichaelRelaxen/racman"; if (Updater.AutoUpdate(args)) { return; } if (func.GetConfigData("config.exe", "FirstLoad") == "" && Convert.ToString(Assembly.GetEntryAssembly().GetName().Version) == "1.0.0.5") { MessageBox.Show("i hope u f****n appreciate this sneep"); func.ChangeFileLines("config.exe", "No", "FirstLoad"); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new AttachPS3Form()); }