예제 #1
0
        private void ReadVersionFromOnline()
        {
            try
            {
                using (WebClient web = new WebClient())
                {
                    string      data = web.DownloadString(online_url);
                    UpdateModel um   = UpdateModel.FromJson(data);

                    online_ver   = um.Version;
                    download_url = um.DownloadUrl.AbsoluteUri;
                }
            }
            catch (Exception e)
            {
                MetroSetMessageBox.Show(this, "Error catched : " + e.Message, "Error");
            }
        }
예제 #2
0
 public static string ToJson(this UpdateModel self) => JsonConvert.SerializeObject(self, QRCreator.Converter.Settings);