shortcut icons

This commit is contained in:
seraphima
2024-06-12 13:16:34 +02:00
parent a5b69d9be5
commit 80f4611b0a
4 changed files with 183 additions and 245 deletions

View File

@@ -271,27 +271,5 @@ namespace ProjectsEditor.Models
return new Rectangle((int)minX, (int)minY, (int)(maxX - minX), (int)(maxY - minY));
}
internal string GetShortcutChars()
{
if (string.IsNullOrEmpty(Name))
{
return "PR";
}
string[] words = Name.Trim().ToUpperInvariant().Split(' ');
if (words.Length > 2)
{
return $"{words[0][0]}{words[1][0]}{words[2][0]}";
}
else if (words.Length == 2)
{
return $"{words[0][0]}{words[1][0]}";
}
else
{
return words[0].Substring(0, Math.Min(3, words[0].Length));
}
}
}
}