-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Шестопалов Андрей #33
base: master
Are you sure you want to change the base?
Conversation
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net48</TargetFramework> |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
{ | ||
public static string GetFileNameFromUser() | ||
{ | ||
while (true) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
TagsCloudContainer/App.cs
Outdated
{ | ||
while (true) | ||
{ | ||
Console.Write("Введите размер изображения (ширина высота): "); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
TagsCloudContainer/App.cs
Outdated
public static string GetFontNameFromUser() | ||
{ | ||
Console.Write("Введите название шрифта: "); | ||
return Console.ReadLine() ?? "Arial"; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
{ | ||
public static bool FontExists(this string fontName) | ||
{ | ||
return FontFamily.Families.Any(f => f.Name.Equals(fontName, StringComparison.OrdinalIgnoreCase)); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
TagsCloudContainer/App.cs
Outdated
return Console.ReadLine() ?? "Arial"; | ||
} | ||
|
||
public static Color GetColorFromUser(string prompt) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
TagsCloudContainer/Program.cs
Outdated
{ | ||
public static void Main() | ||
{ | ||
var fileName = App.GetFileNameFromUser(); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
||
public class Program | ||
{ | ||
public static void Main() |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
||
namespace TagsCloudContainer; | ||
|
||
public class CircularCloudLayouter |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
TagsCloudContainer/FileParser.cs
Outdated
{ | ||
public static Dictionary<string, int> Parse(string wordsPath) | ||
{ | ||
var excludedWordsPath = Path.Combine("..", "..", "..", "excluded_words.txt"); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
return this; | ||
} | ||
|
||
private static List<string> GetWordsFromDoc(string filePath) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
if (Tags.Count == 0) | ||
return System.Drawing.Size.Empty; | ||
|
||
var left = Tags.Select(tag => tag.Rectangle).Min(rectangle => rectangle.Left); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
||
var extension = Path.GetExtension(wordsPath).ToLower(); | ||
|
||
excludedWords = extension switch |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
TagsCloudContainer/Program.cs
Outdated
{ | ||
public static void Main() | ||
{ | ||
var imageDimensions = GetImageDimensionsFromUser("Введите размер изображения (по умолчанию W: 1000, H: 1000):"); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
TagsCloudContainer/Program.cs
Outdated
var layouter = scope.Resolve<CircularCloudLayouter>(); | ||
|
||
layouter | ||
.SetFontName(() => GetFontNameFromUser("Введите название шрифта (по умолчанию Arial):")) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
TagsCloudContainer/Program.cs
Outdated
var container = ContainerConfig.Configure(imageDimensions.Center); | ||
|
||
var fileParser = new WordProcessor(); | ||
var words = fileParser |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
No description provided.