I18NCommander/I18N Commander/UI WinForms/Components/TextElements.cs

20 lines
518 B
C#

using DataModel.Database;
namespace UI_WinForms.Components;
public partial class TextElements : UserControl
{
private Section? currentSection;
public TextElements()
{
this.InitializeComponent();
// When the section is changed, update this component:
AppEvents.WhenSectionChanged += (sender, section) =>
{
this.currentSection = section;
this.buttonAdd.Enabled = this.currentSection is not null;
};
}
}