示例#1
0
 private void ExecuteUpdateTemplates()
 {
     ResultMessage = string.Empty;
     try{
         string url         = "http://dotnetnew-api.azurewebsites.net/template-report.json";
         string filename    = "dotnetnew-template-report.json";
         var    saveAndLoad = new SaveAndLoad();
         saveAndLoad.DownloadAndSave(url, filename);
         string res = saveAndLoad.LoadText(filename);
         ResultMessage = "Templates successfully updated";
         MessagingCenter.Send <UpdatePageViewModel>(this, "TemplateListUpdated");
     }
     catch (Exception ex) {
         ResultMessage = ex.ToString();
     }
 }