From dcc134dc466e5c1e34dcbe69dd7f8881eae57c69 Mon Sep 17 00:00:00 2001 From: "Sergey V. Zhdanovskih" Date: Mon, 17 Jun 2024 22:24:17 +0300 Subject: [PATCH] Added custom event types, the feature to turn off events and add custom ones (fix #566) --- locales/Afrikaans.lng | 14 +- locales/Belarusian.lng | 14 +- locales/Chinese Simplified.lng | 14 +- locales/Dutch.lng | 14 +- locales/English.lng | 14 +- locales/Hungarian.lng | 14 +- locales/Icelandic.lng | 14 +- locales/Japanese.lng | 14 +- locales/Kazakh (Cyrillic).lng | 14 +- locales/Portuguese.lng | 14 +- locales/Serbian (Latin).lng | 14 +- locales/Spanish.lng | 14 +- locales/czech.lng | 14 +- locales/french.lng | 14 +- locales/german.lng | 14 +- locales/help_enu/gkhHistory.html | 1 + locales/help_rus/gkhHistory.html | 1 + locales/italian.lng | 14 +- locales/polish.lng | 14 +- locales/russian.lng | 14 +- locales/ukrainian.lng | 14 +- projects/GKCore/GDModel/GDMFamilyRecord.cs | 4 +- projects/GKCore/GDModel/GDMGroupRecord.cs | 4 +- .../GKCore/GDModel/GDMIndividualRecord.cs | 4 +- projects/GKCore/GDModel/GDMInterfaces.cs | 21 ++ projects/GKCore/GDModel/GDMList.cs | 25 +- projects/GKCore/GDModel/GDMResearchRecord.cs | 6 +- projects/GKCore/GDModel/GDMSourceRecord.cs | 2 +- projects/GKCore/GDModel/GDMTag.cs | 2 +- projects/GKCore/GDModel/GDMTree.cs | 18 +- .../GDModel/Providers/GEDCOM/GEDCOMChecker.cs | 21 +- .../GDModel/Providers/GEDCOM/GEDCOMUtils.cs | 2 +- projects/GKCore/GKCore.csproj | 6 +- projects/GKCore/GKCore/AppHost.cs | 39 ++- projects/GKCore/GKCore/BaseContext.cs | 10 +- .../GKCore/GKCore/Charts/TreeChartModel.cs | 4 +- .../Controllers/AddressEditDlgController.cs | 6 +- .../GKCore/Controllers/BaseController.cs | 31 +++ .../Controllers/EventDefEditDlgController.cs | 115 ++++++++ .../Controllers/EventEditDlgController.cs | 92 +++---- .../FilePropertiesDlgController.cs | 5 +- .../Controllers/NameEditDlgController.cs | 3 +- .../Controllers/OptionsDlgController.cs | 27 +- .../Views/IEventDefEditDlg.cs} | 18 +- .../GKCore/Design/Views/IEventEditDlg.cs | 3 +- .../GKCore/GKCore/Design/Views/IOptionsDlg.cs | 5 +- projects/GKCore/GKCore/EventDefinitions.cs | 251 ++++++++++++++++++ projects/GKCore/GKCore/GKData.cs | 152 +++++------ projects/GKCore/GKCore/GKUtils.cs | 59 +--- projects/GKCore/GKCore/LangMan.cs | 28 +- .../GKCore/GKCore/Lists/EventDefsListModel.cs | 138 ++++++++++ projects/GKCore/GKCore/Lists/ListSource.cs | 6 +- projects/GKCore/GKCore/Lists/SheetModel.cs | 11 +- .../GKCore/Operations/OrdinaryOperation.cs | 4 +- projects/GKCore/GKCore/ScriptEngine.cs | 4 +- projects/GKCore/GKCore/Tools/TreeInspector.cs | 18 +- .../GKCore/GKCore/Types/PredefinedEvent.cs | 55 ++++ projects/GKTests/GDModel/GDMListTests.cs | 4 +- .../GKTests/GDModel/GDMPersonalNameTests.cs | 2 +- projects/GKTests/GKCore/ControllerTests.cs | 2 +- projects/GKTests/GKCore/GKUtilsTests.cs | 7 - .../GKTests/GKCore/ValuesCollectionTests.cs | 2 +- projects/GKv2/GEDKeeper2/GEDKeeper2.csproj | 6 + .../GKUI/Forms/EventDefEditDlg.Designer.cs | 161 +++++++++++ .../GEDKeeper2/GKUI/Forms/EventDefEditDlg.cs | 84 ++++++ .../GKUI/Forms/EventEditDlg.Designer.cs | 10 - .../GEDKeeper2/GKUI/Forms/EventEditDlg.cs | 5 - .../GKUI/Forms/OptionsDlg.Designer.cs | 30 ++- .../GKv2/GEDKeeper2/GKUI/Forms/OptionsDlg.cs | 30 ++- .../GEDKeeper2/GKUI/Platform/WFAppHost.cs | 1 + .../GKComponents/TreeChartBoxTests.cs | 4 +- projects/GKv2/GKTestsUI2/TestUtilsUI.cs | 3 +- .../GKv2/GKTestsUI2/UITests/MainSDITests.cs | 2 +- .../GEDKeeper3/GKUI/Forms/EventDefEditDlg.cs | 99 +++++++ .../GKUI/Forms/EventDefEditDlg.xeto | 49 ++++ .../GEDKeeper3/GKUI/Forms/EventEditDlg.cs | 6 - .../GEDKeeper3/GKUI/Forms/EventEditDlg.xeto | 1 - .../GKv3/GEDKeeper3/GKUI/Forms/OptionsDlg.cs | 26 ++ .../GEDKeeper3/GKUI/Forms/OptionsDlg.xeto | 4 + .../GEDKeeper3/GKUI/Platform/EtoAppHost.cs | 1 + .../GKUI/Forms/EventDefEditDlg.xaml | 54 ++++ .../GKUI/Forms/EventDefEditDlg.xaml.cs | 72 +++++ .../GEDKeeperX/GKUI/Forms/EventEditDlg.xaml | 1 - .../GKUI/Forms/EventEditDlg.xaml.cs | 5 - .../GEDKeeperX/GKUI/Forms/OptionsDlg.xaml | 4 + .../GEDKeeperX/GKUI/Forms/OptionsDlg.xaml.cs | 11 + .../GEDKeeperX/GKUI/Platform/XFAppHost.cs | 1 + 87 files changed, 1684 insertions(+), 470 deletions(-) create mode 100644 projects/GKCore/GKCore/Controllers/EventDefEditDlgController.cs rename projects/GKCore/GKCore/{Types/PersonEventKind.cs => Design/Views/IEventDefEditDlg.cs} (63%) create mode 100644 projects/GKCore/GKCore/EventDefinitions.cs create mode 100644 projects/GKCore/GKCore/Lists/EventDefsListModel.cs create mode 100644 projects/GKCore/GKCore/Types/PredefinedEvent.cs create mode 100644 projects/GKv2/GEDKeeper2/GKUI/Forms/EventDefEditDlg.Designer.cs create mode 100644 projects/GKv2/GEDKeeper2/GKUI/Forms/EventDefEditDlg.cs create mode 100644 projects/GKv3/GEDKeeper3/GKUI/Forms/EventDefEditDlg.cs create mode 100644 projects/GKv3/GEDKeeper3/GKUI/Forms/EventDefEditDlg.xeto create mode 100644 projects/GKvX/GEDKeeperX/GKUI/Forms/EventDefEditDlg.xaml create mode 100644 projects/GKvX/GEDKeeperX/GKUI/Forms/EventDefEditDlg.xaml.cs diff --git a/locales/Afrikaans.lng b/locales/Afrikaans.lng index a2ad27fd0..ba74576d5 100644 --- a/locales/Afrikaans.lng +++ b/locales/Afrikaans.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/Belarusian.lng b/locales/Belarusian.lng index adc3403a4..a007ff9a9 100644 --- a/locales/Belarusian.lng +++ b/locales/Belarusian.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/Chinese Simplified.lng b/locales/Chinese Simplified.lng index 826a007d7..2cbafb923 100644 --- a/locales/Chinese Simplified.lng +++ b/locales/Chinese Simplified.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/Dutch.lng b/locales/Dutch.lng index 6ab834973..1acbd5782 100644 --- a/locales/Dutch.lng +++ b/locales/Dutch.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/English.lng b/locales/English.lng index 302e0861d..ab9660a18 100644 --- a/locales/English.lng +++ b/locales/English.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/Hungarian.lng b/locales/Hungarian.lng index 41f7b20e0..96d01d133 100644 --- a/locales/Hungarian.lng +++ b/locales/Hungarian.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/Icelandic.lng b/locales/Icelandic.lng index f2e594905..734d6f2cd 100644 --- a/locales/Icelandic.lng +++ b/locales/Icelandic.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/Japanese.lng b/locales/Japanese.lng index 7242b9eb5..b2749d9fe 100644 --- a/locales/Japanese.lng +++ b/locales/Japanese.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/Kazakh (Cyrillic).lng b/locales/Kazakh (Cyrillic).lng index a47a760d3..8077194bf 100644 --- a/locales/Kazakh (Cyrillic).lng +++ b/locales/Kazakh (Cyrillic).lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/Portuguese.lng b/locales/Portuguese.lng index 4465c3b9d..af4cff212 100644 --- a/locales/Portuguese.lng +++ b/locales/Portuguese.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/Serbian (Latin).lng b/locales/Serbian (Latin).lng index 9318e6668..f3832b770 100644 --- a/locales/Serbian (Latin).lng +++ b/locales/Serbian (Latin).lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/Spanish.lng b/locales/Spanish.lng index 2238a2a69..0ec4ec695 100644 --- a/locales/Spanish.lng +++ b/locales/Spanish.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/czech.lng b/locales/czech.lng index 16f007af5..1fb9a82ed 100644 --- a/locales/czech.lng +++ b/locales/czech.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/french.lng b/locales/french.lng index 711b5041d..19d5970db 100644 --- a/locales/french.lng +++ b/locales/french.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/german.lng b/locales/german.lng index 453682db1..b7ec5cd29 100644 --- a/locales/german.lng +++ b/locales/german.lng @@ -970,13 +970,13 @@ 960=Source without links 961=Check links -962= -963= -964= -965= -966= -967= -968= +962=Event types +963=Count +964=Enabled +965=Tag +966=Description +967=For custom events and facts, the type must be entered +968=Event Definition 969= 970= diff --git a/locales/help_enu/gkhHistory.html b/locales/help_enu/gkhHistory.html index 3065d7563..a9b9eb7ff 100644 --- a/locales/help_enu/gkhHistory.html +++ b/locales/help_enu/gkhHistory.html @@ -12,6 +12,7 @@

Change log

14.06.2024 [v2.30.1 & v3.6.1]