2022-07-12 18:50:03 +00:00
|
|
|
|
using DataModel.Database;
|
|
|
|
|
|
|
|
|
|
namespace UI_WinForms;
|
|
|
|
|
|
|
|
|
|
internal static class AppEvents
|
|
|
|
|
{
|
2022-10-29 18:16:44 +00:00
|
|
|
|
#region Event: Settings were
|
|
|
|
|
|
2022-10-30 15:23:20 +00:00
|
|
|
|
internal static event EventHandler? WhenSettingsChanged;
|
2022-10-29 18:16:44 +00:00
|
|
|
|
|
|
|
|
|
internal static void SettingsChanged() => WhenSettingsChanged?.Invoke(null, EventArgs.Empty);
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
2022-07-23 19:34:51 +00:00
|
|
|
|
#region Event: Section was changed
|
|
|
|
|
|
2022-07-20 18:51:12 +00:00
|
|
|
|
// Section changed event which can be subscribed:
|
2022-10-30 15:23:20 +00:00
|
|
|
|
internal static event EventHandler<Section>? WhenSectionChanged;
|
2022-07-12 18:50:03 +00:00
|
|
|
|
|
2022-07-20 18:51:12 +00:00
|
|
|
|
// Method to raise the section changed event:
|
2022-07-23 19:34:51 +00:00
|
|
|
|
internal static void SectionChanged(Section section) => WhenSectionChanged?.Invoke(null, section);
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Event: Text element was changed
|
|
|
|
|
|
2022-07-20 18:51:12 +00:00
|
|
|
|
// Text element changed event which can be subscribed:
|
2022-10-30 15:23:20 +00:00
|
|
|
|
internal static event EventHandler<TextElement?>? WhenTextElementChanged;
|
2022-07-20 18:51:12 +00:00
|
|
|
|
|
|
|
|
|
// Method to raise the text element changed event:
|
2022-09-21 16:21:52 +00:00
|
|
|
|
internal static void TextElementChanged(TextElement? textElement) => WhenTextElementChanged?.Invoke(null, textElement);
|
2022-07-23 19:34:51 +00:00
|
|
|
|
|
|
|
|
|
#endregion
|
2022-09-26 17:25:51 +00:00
|
|
|
|
|
|
|
|
|
#region Translation was changed
|
|
|
|
|
|
|
|
|
|
// Translation changed event which can be subscribed:
|
2022-10-30 15:23:20 +00:00
|
|
|
|
internal static event EventHandler<Translation?>? WhenTranslationChanged;
|
2022-09-26 17:25:51 +00:00
|
|
|
|
|
|
|
|
|
// Method to raise the translation changed event:
|
|
|
|
|
internal static void TranslationChanged(Translation? translation) => WhenTranslationChanged?.Invoke(null, translation);
|
|
|
|
|
|
|
|
|
|
#endregion
|
2022-07-12 18:50:03 +00:00
|
|
|
|
}
|