private void ShowConnectionError() { uicontrols.Feedback fb = new global::umbraco.uicontrols.Feedback(); fb.type = global::umbraco.uicontrols.Feedback.feedbacktype.error; fb.Text = "<strong>No connection to repository.</strong> Starter Kits Designs could not be fetched from the repository as there was no connection to: '" + repo.RepositoryUrl + "'"; pl_loadStarterKitDesigns.Controls.Clear(); pl_loadStarterKitDesigns.Controls.Add(fb); }
protected override void OnInit(EventArgs e) { base.OnInit(e); string repoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66"; var repo = cms.businesslogic.packager.repositories.Repository.getByGuid(repoGuid); if (repo == null) { throw new InvalidOperationException("Could not find repository with id " + repoGuid); } var fb = new global::umbraco.uicontrols.Feedback(); fb.type = global::umbraco.uicontrols.Feedback.feedbacktype.error; fb.Text = "<strong>No connection to repository.</strong> Modules could not be fetched from the repository as there was no connection to: '" + repo.RepositoryUrl + "'"; if (repo.HasConnection()) { try { if (UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema) { rep_nitros.DataSource = repo.Webservice.NitrosCategorizedByVersion(cms.businesslogic.packager.repositories.Version.Version4); } else { rep_nitros.DataSource = repo.Webservice.NitrosCategorizedByVersion(cms.businesslogic.packager.repositories.Version.Version41); } rep_nitros.DataBind(); } catch (Exception ex) { LogHelper.Error <LoadNitros>("An error occurred", ex); loadNitros.Controls.Clear(); loadNitros.Controls.Add(fb); //nitroList.Visible = false; //lt_status.Text = "<div class='error'><p>Nitros could not be fetched from the repository. Please check your internet connection</p><p>You can always install Nitros later in the packages section</p><p>" + ex.ToString() + "</p></div>"; } } else { loadNitros.Controls.Clear(); loadNitros.Controls.Add(fb); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); string repoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66"; cms.businesslogic.packager.repositories.Repository repo = cms.businesslogic.packager.repositories.Repository.getByGuid(repoGuid); uicontrols.Feedback fb = new global::umbraco.uicontrols.Feedback(); fb.type = global::umbraco.uicontrols.Feedback.feedbacktype.error; fb.Text = "<strong>No connection to repository.</strong> Modules could not be fetched from the repository as there was no connection to: '" + repo.RepositoryUrl + "'"; if (repo.HasConnection()) { try { if(UmbracoSettings.UseLegacyXmlSchema) rep_nitros.DataSource = repo.Webservice.NitrosCategorizedByVersion(cms.businesslogic.packager.repositories.Version.Version4); else rep_nitros.DataSource = repo.Webservice.NitrosCategorizedByVersion(cms.businesslogic.packager.repositories.Version.Version41); rep_nitros.DataBind(); } catch (Exception ex) { Log.Add(LogTypes.Debug, -1, ex.ToString()); loadNitros.Controls.Clear(); loadNitros.Controls.Add(fb); //nitroList.Visible = false; //lt_status.Text = "<div class='error'><p>Nitros could not be fetched from the repository. Please check your internet connection</p><p>You can always install Nitros later in the packages section</p><p>" + ex.ToString() + "</p></div>"; } } else { loadNitros.Controls.Clear(); loadNitros.Controls.Add(fb); } }