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"); } }
public static string ToJson(this UpdateModel self) => JsonConvert.SerializeObject(self, QRCreator.Converter.Settings);