internal ConfigurationDialogComponentControl(ConfigurationDialogComponent component, Control navigatorControl) : base(component) { InitializeComponent(); _component = component; component.PropertyChanged += OnPropertyChanged; _warningMessage.DataBindings.Add("Text", _component, "ConfigurationWarning", true); UpdateOfflineWarningVisibility(); _tableLayoutPanel.Controls.Add(navigatorControl, 0, 1); Size = _tableLayoutPanel.Size; _tableLayoutPanel.SizeChanged += (s, e) => Size = _tableLayoutPanel.Size; }
/// <summary> /// Shows all <see cref="IConfigurationPage"/>s returned by extensions of /// <see cref="SharedConfigurationPageProviderExtensionPoint"/> /// in a dialog, with a navigable tree to select the pages. /// </summary> public static ApplicationComponentExitCode Show(IDesktopWindow desktopWindow, string initialPageIdentifier) { var pages = GetPages(); if (pages.Count == 0) { //There are pages in this plugin, so this is the most likely reason, although I suppose not the only one. desktopWindow.ShowMessageBox(SR.MessageSystemConfigurationNoPermission, MessageBoxActions.Ok); return(ApplicationComponentExitCode.None); } var container = new ConfigurationDialogComponent(pages, initialPageIdentifier); var exitCode = ApplicationComponent.LaunchAsDialog(desktopWindow, container, SR.TitleSharedConfiguration); return(exitCode); }