public static SettingsProvider Create(DocumentWindow documentWindow, object[] selectedObjects, TableLayoutPanel layoutPanel, object anyData, bool update) { //create special SettingsProvider provider = null; CreateProvider?.Invoke(documentWindow, selectedObjects, layoutPanel, anyData, ref provider); //create default if (provider == null) { provider = new SettingsProvider(documentWindow, selectedObjects, layoutPanel, anyData); } if (update) { try { //!!!! layoutPanel.SuspendLayout(); provider.PerformUpdate(false); } finally { layoutPanel.ResumeLayout(); } } return(provider); }
public IProviderForTypeOptions AddCreate(CreateProvider createProvider) { if (Create != null) { throw new CannotConfigureTheSameProviderTwiceException(); } Create = createProvider; return(this); }
public void AddProvider(string name, CreateProvider ctor) { providers.Add(name, ctor); }