private void detailsLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { AppListErrorDialog d = new AppListErrorDialog(); d.ErrorText = DetailsText; d.ShowDialog(); }
private void LoadApplicationList(string filename) { ApplicationList appList; SetErrorPanelVisibility(false); try { appList = ApplicationList.FromFile(filename); InstallPadApp.AppList = appList; } catch (FileNotFoundException) { ShowErrorBox(Resources.AppFileNotFound, null); return; } catch (XmlException ex) { ShowErrorBox(Resources.AppFileParseError, ex.Message); return; } appList.FileName = filename; if (appList.ApplicationItems.Count <= 0) { SetControlsEnabled(false); } else { SetControlsEnabled(true); } // Show errors, if we had any in loading if (appList.XmlErrors.Count > 0) { errorDialog = new AppListErrorDialog(); foreach (string error in appList.XmlErrors) { errorDialog.ErrorText += error + System.Environment.NewLine; } // Show the "encountered errors" label //this.errorPanel.Show(); SetErrorPanelVisibility(true); } List <Control> toAdd = new List <Control>(); foreach (ApplicationItem item in appList.ApplicationItems) { ApplicationListItem listItem = CreateApplicationListItem(item); toAdd.Add(listItem); } // Add the controls all at once. this.controlList.AddAll(toAdd); }
private void moreInfoLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { AppListErrorDialog d = new AppListErrorDialog(); d.Text=detailsDialogTitle; d.ErrorText = DetailsText; d.ShowDialog(); }
private void LoadApplicationList(string filename) { ApplicationList appList; SetErrorPanelVisibility(false); try { appList = ApplicationList.FromFile(filename); InstallPadApp.AppList = appList; } catch (FileNotFoundException) { ShowErrorBox(Resources.AppFileNotFound, null); return; } catch (XmlException ex) { ShowErrorBox(Resources.AppFileParseError, ex.Message); return; } appList.FileName = filename; if (appList.ApplicationItems.Count <= 0) SetControlsEnabled(false); else SetControlsEnabled(true); // Show errors, if we had any in loading if (appList.XmlErrors.Count > 0) { errorDialog = new AppListErrorDialog(); foreach (string error in appList.XmlErrors) errorDialog.ErrorText += error + System.Environment.NewLine; // Show the "encountered errors" label //this.errorPanel.Show(); SetErrorPanelVisibility(true); } List<Control> toAdd = new List<Control>(); foreach (ApplicationItem item in appList.ApplicationItems) { ApplicationListItem listItem = CreateApplicationListItem(item); toAdd.Add(listItem); } // Add the controls all at once. this.controlList.AddAll(toAdd); }