Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Virtical
Copy link

No description provided.

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net48</TargetFramework>

This comment was marked as resolved.

{
public static string GetFileNameFromUser()
{
while (true)

This comment was marked as resolved.

{
while (true)
{
Console.Write("Введите размер изображения (ширина высота): ");

This comment was marked as resolved.

public static string GetFontNameFromUser()
{
Console.Write("Введите название шрифта: ");
return Console.ReadLine() ?? "Arial";

This comment was marked as resolved.

{
public static bool FontExists(this string fontName)
{
return FontFamily.Families.Any(f => f.Name.Equals(fontName, StringComparison.OrdinalIgnoreCase));

This comment was marked as resolved.

return Console.ReadLine() ?? "Arial";
}

public static Color GetColorFromUser(string prompt)

This comment was marked as resolved.

{
public static void Main()
{
var fileName = App.GetFileNameFromUser();

This comment was marked as resolved.


public class Program
{
public static void Main()

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не нравится что этот класс отвечает и за генерацию последовательности прямоугольников, и за размещение текста по ним. Кажется это две разные ответственности, которые нужно разделить.

{
public static Dictionary<string, int> Parse(string wordsPath)
{
var excludedWordsPath = Path.Combine("..", "..", "..", "excluded_words.txt");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что если пользователь захочет дополнительно какие-то слова исключать, передавая их при запуске. Давай сделаем какой-нибудь класс с интерфейсом, суть которого получить все слова, которые надо исключить

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants