private void ReinstallBTDToolboxToolStripMenuItem_Click(object sender, EventArgs e) { update = new UpdateHandler(); update.reinstall = true; update.HandleUpdates(); }
private void Main_Load(object sender, EventArgs e) { bg = new BGForm(); bg.MdiParent = this; bg.MouseClick += Bg_MouseClick; bg.Show(); if (File.Exists(Environment.CurrentDirectory + "\\BTDToolbox_Updater.exe")) { File.Delete(Environment.CurrentDirectory + "\\BTDToolbox_Updater.exe"); } if (File.Exists(Environment.CurrentDirectory + "\\BTDToolbox_Updater.zip")) { File.Delete(Environment.CurrentDirectory + "\\BTDToolbox_Updater.zip"); } if (File.Exists(Environment.CurrentDirectory + "\\Update")) { File.Delete(Environment.CurrentDirectory + "\\Update"); } ConsoleHandler.console = new Console(); ConsoleHandler.console.MdiParent = this; ConsoleHandler.console.CreateLogFile(); if (Serializer.cfg.EnableConsole == true) { ConsoleHandler.console.Show(); } else { ConsoleHandler.console.Hide(); } ConsoleHandler.append("Program loaded!"); if (Serializer.cfg.recentUpdate == true) { ConsoleHandler.append("BTD Toolbox has successfully updated."); } if (!Serializer.cfg.disableUpdates) { new Thread(() => { ConsoleHandler.append("Reading announcements..."); ConsoleHandler.announcement(); ConsoleHandler.append("Checking for updates..."); var isUpdate = new UpdateHandler(); isUpdate.HandleUpdates(); }).Start(); } foreach (Control con in Controls) { if (con is MdiClient) { mdiClient = con as MdiClient; } } }
private void UpdaterToolStripMenuItem_Click(object sender, EventArgs e) { update = new UpdateHandler(); update.HandleUpdates(); }