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);
        }
Example #2
0
 public IProviderForTypeOptions AddCreate(CreateProvider createProvider)
 {
     if (Create != null)
     {
         throw new CannotConfigureTheSameProviderTwiceException();
     }
     Create = createProvider;
     return(this);
 }
Example #3
0
 public void AddProvider(string name, CreateProvider ctor)
 {
     providers.Add(name, ctor);
 }