public static ConfigGroup AddGroup(this IConfigItemContainer c) { ConfigGroup g = new ConfigGroup(c.ConfigManager); c.Items.Add(g); return(g); }
private void InitializeUI() { if( _fromService == null && _fromConfig == null ) { var s = AddActivableSection( R.Scrolling, String.Empty ); if( _fromService == null ) { _fromService = new ScrollingConfigGroup( _app.ConfigManager ); s.Items.Add( _fromService ); _fromService.Description = R.ActiveModules; _fromService.DisplayName = R.ScrollableElements; } if( _fromConfig == null ) { _fromConfig = new ScrollingConfigGroup( _app.ConfigManager ); s.Items.Add( _fromConfig ); _fromConfig.Description = R.ForbiddenModules; _fromConfig.DisplayName = R.UnScrollableElements; } _applyButton = new IsDirtyConfigItemApply( ConfigManager, new VMCommand( Apply ), () => { return IsDirty; } ) { DisplayName = R.Apply }; this.Items.Add( _applyButton ); } }
private void FillGroupFromModules( ref ConfigGroup group, ObservableCollection<ScrollingElement> modules ) { if( group == null ) { InitializeUI(); } group.Items.Clear(); foreach( var module in modules ) { group.Items.Add( module ); } }