private void timer4_Tick(object sender, EventArgs e) { try { string updateurl = null; if (RipLeech.Properties.Settings.Default.betaupdates == true) { updateurl = "https://dl.dropbox.com/u/22054429/RipLeech/RipLeech_beta_version.txt"; if (!File.Exists("beta.lock")) { File.Create("beta.lock"); } } else { updateurl = "https://dl.dropbox.com/u/22054429/RipLeech/RipLeech_version.txt"; } HttpWebRequest request = (HttpWebRequest)WebRequest.Create(updateurl); WebResponse response = request.GetResponse(); System.IO.StreamReader sr = new System.IO.StreamReader(response.GetResponseStream(), System.Text.Encoding.GetEncoding("windows-1252")); string update = sr.ReadToEnd(); int build = Convert.ToInt32(update); int thisbuild = RipLeech.Properties.Settings.Default.progvers; if (build > thisbuild) { updatefound upd = new updatefound(); upd.Show(); timer4.Stop(); } } catch { timer4.Stop(); } }