Exemple #1
0
        private void CreateVisibilityControl(NameAttribute displayNameAttribute)
        {
            var visibilityControl = new ConfigVisibilityControl(_localController.GetLocalStrings <SDGuiStrings>(), _coreConfigSection, _buildController);

            visibilityControl.ConfigItemDisplayName = _localController.GetLocalString(displayNameAttribute.LocalType, displayNameAttribute.DisplayName);

            configItemPanel.Children.Add(visibilityControl);
        }
        private void AddSection(IConfigSection configSection)
        {
            var displayNameAttribute = (NameAttribute)Attribute.GetCustomAttribute(configSection.GetType(), typeof(NameAttribute));

            if (displayNameAttribute != null)
            {
                var configSectionControl = new ConfigSectionControl(_localController, _configController.GetConfigSection <ICoreConfigSection>(), _allExporters, _buildController);
                configSectionControl.SectionHeader = _localController.GetLocalString(displayNameAttribute.LocalType, displayNameAttribute.DisplayName);
                configSectionControl.ConfigSection = configSection;

                configPanel.Children.Add(configSectionControl);
            }
        }