-
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давай инициализацию контейнера вынесем в отдельный метод, а лучше класс, а тут оставим только запуск облака тэгов
|
||
namespace TagsCloudContainer; | ||
|
||
public class CircularCloudLayouter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не нравится что этот класс отвечает и за генерацию последовательности прямоугольников, и за размещение текста по ним. Кажется это две разные ответственности, которые нужно разделить.
TagsCloudContainer/FileParser.cs
Outdated
{ | ||
public static Dictionary<string, int> Parse(string wordsPath) | ||
{ | ||
var excludedWordsPath = Path.Combine("..", "..", "..", "excluded_words.txt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Что если пользователь захочет дополнительно какие-то слова исключать, передавая их при запуске. Давай сделаем какой-нибудь класс с интерфейсом, суть которого получить все слова, которые надо исключить
No description provided.