Exemplo n.º 1
0
        private void FrmMain_Load(object sender, EventArgs e)
        {
            try
            {
                var req = (HttpWebRequest)WebRequest.Create("http://update.utopiarealms.com/index.update");

                using (var resp = req.GetResponse())
                {
                    var stream = resp.GetResponseStream();
                    using (var zs = new GZipStream(stream, CompressionMode.Decompress))
                    {
                        var reader = new BinaryReader(zs);
                        _previousFile = new UpdateFile();
                        _previousFile.Load(reader);
                    }
                }

                label4.Text   = _previousFile.Version + " " + _previousFile.UpdateToken;
                textBox1.Text = _previousFile.Message;
            }
            catch (Exception)
            {
            }
        }