コード例 #1
0
ファイル: ConsoInterface.cs プロジェクト: Klim0o0/di
        private static void CreateTagCloud(ITagCloudCreatorFactory tagCloudCreatorFactory, TagCloudSettings tagCloudSettings)
        {
            var bitmap = GetCloudImage(tagCloudCreatorFactory,
                                       tagCloudSettings.PictureSize,
                                       tagCloudSettings.CloudCenter,
                                       tagCloudSettings.Colors,
                                       tagCloudSettings.FontName,
                                       tagCloudSettings.MaxFontSize,
                                       tagCloudSettings.InputFile,
                                       tagCloudSettings.BoringWordsFile);

            bitmap.Save(tagCloudSettings.OutputFile);
        }
コード例 #2
0
ファイル: ConsoInterface.cs プロジェクト: Klim0o0/di
 private static Bitmap GetCloudImage(ITagCloudCreatorFactory tagCloudCreatorFactory, Size pictureSize,
                                     Point cloudCenter, Color[] colors, string fontName,
                                     int maxFontSize, string inputFile, string boringWordsFile)
 {
     var tagCloudCreator = tagCloudCreatorFactory
         .Get(pictureSize,
              cloudCenter,
              colors,
              fontName,
              maxFontSize,
              inputFile,
              boringWordsFile);
     var bitmap = tagCloudCreator.GetCloud();
     return bitmap;
 }
コード例 #3
0
ファイル: ConsoInterface.cs プロジェクト: Klim0o0/di
 public ConsoleInterface(ITagCloudCreatorFactory tagCloudCreatorFactory)
 {
     this.tagCloudCreatorFactory = tagCloudCreatorFactory;
 }