csharpdeeb25a2 | 1 | namespace CascadeIDE.Models; |
| 2 | |
| 3 | /// <summary> |
| 4 | /// Регистрация страницы настроек для автоматического бокового списка (см. <see cref="Services.SettingsPanelRegistry"/>). |
| 5 | /// Вешать на code-behind <c>*SettingsPanelView</c>. |
| 6 | /// </summary> |
| 7 | [AttributeUsage(AttributeTargets.Class, Inherited = false)] |
| 8 | public sealed class SettingsPanelAttribute : Attribute |
| 9 | { |
| 10 | public SettingsPanelAttribute(string panelId, string title, string group = "", int order = 100) |
| 11 | { |
| 12 | PanelId = panelId; |
| 13 | Title = title; |
| 14 | Group = group; |
| 15 | Order = order; |
| 16 | } |
| 17 | |
| 18 | /// <summary>Идентификатор панели (<see cref="SettingsPanelIds"/>).</summary> |
| 19 | public string PanelId { get; } |
| 20 | |
| 21 | public string Title { get; } |
| 22 | |
| 23 | public string Group { get; } |
| 24 | |
| 25 | public int Order { get; } |
| 26 | |
| 27 | /// <summary>Скрыть пункт в списке (TOML override или тесты).</summary> |
| 28 | public bool Hidden { get; set; } |
| 29 | } |
| 30 | |
View only · write via MCP/CIDE