示例#1
0
        public void CreateCloudFunctionalTest()
        {
            tagsCloudCreator.CreateCloud(textPath, imagePath);

            var current  = File.ReadAllBytes(imagePath);
            var expected = File.ReadAllBytes(expectedImagePath);

            current.Should().Equal(expected);
        }
示例#2
0
文件: ConfigWindow.cs 项目: Jevvry/di
 private void ShowImage(object sender, EventArgs eventArgs)
 {
     tableLayoutPanel.Hide();
     Size = imageConfig.ImageSize;
     tagsCloudProcessor.CreateCloud(wordsConfig.Path, imageConfig.Path);
     using var image    = Image.FromFile(imageConfig.Path);
     using var graphics = CreateGraphics();
     graphics.DrawImage(image, new PointF(0, 0));
 }
示例#3
0
文件: ConfigWindow.cs 项目: Jevvry/fp
 private void ShowImage(object sender, EventArgs eventArgs)
 {
     AcceptSettings();
     tableLayoutPanel.Hide();
     backSettingsButton.Show();
     tagsCloudProcessor.CreateCloud(wordsConfig.Path, imageConfig.Path)
     .Then(value => DrawCloud())
     .OnFail(ShowErrorBox);
 }