public void check_updates(string passed_console_save_Location) { try { Update_Form update_codebase = new Update_Form(internal_version, "http://programs.buildingtents.com/6to4CardCleaner/", "http://programs2.buildingtents.com/6to4CardCleaner/", "6to4 Card Cleaner.exe"); string private_aversion = update_codebase.public_find_new_version()[0]; string[] AVersion = private_aversion.Split(new Char [] {'.', ' '}); //[0] is major, [1] is minor string[] CVersion = internal_version.Split(new Char [] {'.', ' '}); if (AVersion.Length >= 2 && CVersion.Length >= 2) //properly formated version numbers { if (Convert.ToInt32(AVersion[0]) > Convert.ToInt32(CVersion[0]) || Convert.ToInt32(AVersion[1]) > Convert.ToInt32(CVersion[1])) { MessageBox.Show("This is a out-of-date version, " + internal_version + ", version " + private_aversion + " is available, please click update if you wish to get the latest version.", "Update", MessageBoxButtons.OK, MessageBoxIcon.Information); } } update_codebase = null; if (update_codebase != null) update_codebase.Dispose(); private_aversion = null; AVersion = null; CVersion = null; } catch { } }
private void Update_Button_Click_wrapper() { Update_Form update_box = new Update_Form(internal_version, "https://raw.github.com/daberkow/6to4-Card-Cleaner/master/updates/", "http://programs2.buildingtents.com/6to4CardCleaner/", "6to4 Card Cleaner.exe"); update_box.StartPosition = FormStartPosition.CenterScreen; update_box.ShowDialog(); update_box = null; if (update_box != null) update_box.Dispose(); internal_threadcount = 0; }