Exemplo n.º 1
0
 public TagsCloudHandler(
     IEnumerable <IWordsFilter> filters,
     IWordNormalizer normalizer,
     ITagsCloudDrawer drawer)
 {
     wordNormalizer = normalizer;
     wordsFilters   = filters;
     this.drawer    = drawer;
 }
Exemplo n.º 2
0
Arquivo: Mainform.cs Projeto: Inree/di
 public Mainform(IRectanglesLayouter[] rectanglesLayouters,
                 TagsCloudHandler tagsCloudHandler,
                 ITagsCloudDrawer drawer,
                 TagsCloudSettings settings,
                 IWordsFilter filter,
                 IEnumerable <IFileReader> fileReaders)
 {
     this.tagsCloudHandler = tagsCloudHandler;
     this.settings         = settings;
     this.filter           = filter;
     this.fileReaders      = fileReaders.ToHashSet();
     tagsCloudDrawer       = drawer;
     fontFamilies          = settings.FontSettings.FontFamilies.ToDictionary(family => family.Name);
     fontStyles            = settings.FontSettings.FontStyles.ToDictionary(style => style.ToString());
     layouters             = rectanglesLayouters.ToDictionary(c => c.Name);
     InitializeComponent();
     FontFamilyChoice.DataSource = settings.FontSettings.FontFamilies.Select(f => f.Name).ToList();
     FontStyleChoice.DataSource  = settings.FontSettings.FontStyles.Select(f => f.ToString()).ToList();
     AlgorithmChoice.DataSource  = rectanglesLayouters.Select(c => c.Name).ToList();
 }