From 2e45be4c4dcad2746771be6bb948706611c4bc67 Mon Sep 17 00:00:00 2001 From: Olivier Rogier Date: Sat, 24 Sep 2022 19:51:33 +0200 Subject: [PATCH 1/5] Update file --- .../Source/Program/Translations/AppTranslations.News.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Project/Source/Program/Translations/AppTranslations.News.cs b/Project/Source/Program/Translations/AppTranslations.News.cs index 9822e4f63..51e4bcb2b 100644 --- a/Project/Source/Program/Translations/AppTranslations.News.cs +++ b/Project/Source/Program/Translations/AppTranslations.News.cs @@ -47,6 +47,13 @@ static partial class AppTranslations // TODO delete all 9.x without changing 9.x + ["9.33"] = new TranslationsDictionary + { + [Language.EN] = "• Add search parashah text box in parashot board.", + + [Language.FR] = "• Ajout d'une zone de texte de recherche de parashah dans le tableau des parashot." + }, + ["9.29"] = new TranslationsDictionary { [Language.EN] = "• Optimize populating monthly view and startup time." + Globals.NL + From 1e6326636d8fd2a18ab4792ddae265d1e6dc9493 Mon Sep 17 00:00:00 2001 From: Olivier Rogier Date: Sun, 25 Sep 2022 05:11:15 +0200 Subject: [PATCH 2/5] Update file --- Project/Properties/AssemblyInfo.cs | 4 +- .../Translations/AppTranslations.News.cs | 100 ------------------ Setup/OrdisoftwareHebrewCalendarSetup.iss | 2 +- 3 files changed, 3 insertions(+), 103 deletions(-) diff --git a/Project/Properties/AssemblyInfo.cs b/Project/Properties/AssemblyInfo.cs index a4c780b38..e96ba2ea3 100644 --- a/Project/Properties/AssemblyInfo.cs +++ b/Project/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // en utilisant '*', comme indiqué ci-dessous : // [assembly: AssemblyVersion("1.0.*")] [assembly: NeutralResourcesLanguage("en")] -[assembly: AssemblyVersion("9.34.0.0")] -[assembly: AssemblyFileVersion("9.34.0.0")] +[assembly: AssemblyVersion("9.33.0.0")] +[assembly: AssemblyFileVersion("9.33.0.0")] diff --git a/Project/Source/Program/Translations/AppTranslations.News.cs b/Project/Source/Program/Translations/AppTranslations.News.cs index 51e4bcb2b..e70d60f72 100644 --- a/Project/Source/Program/Translations/AppTranslations.News.cs +++ b/Project/Source/Program/Translations/AppTranslations.News.cs @@ -45,8 +45,6 @@ static partial class AppTranslations "• Quelques améliorations et corrections." },*/ - // TODO delete all 9.x without changing 9.x - ["9.33"] = new TranslationsDictionary { [Language.EN] = "• Add search parashah text box in parashot board.", @@ -54,104 +52,6 @@ static partial class AppTranslations [Language.FR] = "• Ajout d'une zone de texte de recherche de parashah dans le tableau des parashot." }, - ["9.29"] = new TranslationsDictionary - { - [Language.EN] = "• Optimize populating monthly view and startup time." + Globals.NL + - "• Add open system calculator button in dates difference calculator form." + Globals.NL + - "• Add parashah name in the title bar of description box." + Globals.NL + - "• Add menu for transcription guide in Tools menu and others windows." + Globals.NL + - "• Add menu for grammar guide in Tools and others windows." + Globals.NL + - "• Add option to use two days for Shebih'i Shel Pessa'h outside of Israël." + Globals.NL + - "• Add option to retake or not the focus when clicking date in reminder box." + Globals.NL + - "• Fix day of shavouh'ot 2 in case of moon omer that is wrong due to days without moonrise." + Globals.NL + - "• Fix shavouh'ot 1 and 2 hours to be solar like shabat even using moon omer." + Globals.NL + - "• Fix reset settings crashes the monthly view until restart." + Globals.NL + - "• Fix multiple parashah description boxes at the same time which only displays the first one opened until closed." + Globals.NL + - "• Fix save in parashot board causes a null exception in case of empty cells in the grid." + Globals.NL + - "• Fix intermediate day names of weekly celebrations in case of moonrise occurring the next day (moon omer)." + Globals.NL + - "• Fix disable reminder button not disabled if disabling is not allowed in preferences." + Globals.NL + - "• Improve transcriptions following a change to better distinguish between He, 'Het, H'ayin, T'et and Tav." + Globals.NL + - "• Some UI/UX improvements and fixes." + Globals.NL + - "• Reorganize and add some web links", - - [Language.FR] = "• Optimisation du remplissage de la vue par mois et du temps de démarrage." + Globals.NL + - "• Ajout d'un bouton pour ouvrir la calculatrice système dans le formulaire de calcul de différence de dates." + Globals.NL + - "• Ajout du nom de la parashah dans la barre de titre de la fenêtre de description." + Globals.NL + - "• Ajout d'un menu guide de transcription dans le menu Outils et les autres fenêtres." + Globals.NL + - "• Ajout d'un menu guide de grammaire dans le menu Outils et les autres fenêtres." + Globals.NL + - "• Ajout d'une option pour utiliser deux jours pour Shebih'i Shel Pessa'h en dehors d'Israël." + Globals.NL + - "• Ajout d'une option pour reprendre ou non le focus en cliquant sur la date dans la boîte de rappel." + Globals.NL + - "• Correction du jour de shavouh'ot 2 en cas de omer de la lune erroné en raison de jours sans lever de lune." + Globals.NL + - "• Correction des heures de shavouh'ot 1 et 2 pour être solaires comme le shabat même en utilisant le omer de la lune." + Globals.NL + - "• Correction de la réinitialisation des paramètres qui plante la vue mensuelle jusqu'au redémarrage." + Globals.NL + - "• Correction de plusieurs boîtes de description de parashah ouvertes en même temps qui n'affichent que la première ouverte jusqu'à la fermeture." + Globals.NL + - "• Correction de l'enregistrement dans le tableau des parashot qui provoque une null exception en cas de cellules vides dans la grille." + Globals.NL + - "• Correction des noms des jours intermédiaires des célébrations hebdomadaires en cas de lever de lune survenant le lendemain (omer de la lune)." + Globals.NL + - "• Correction du bouton de désactivation du rappeleur non désactivé si la désactivation n'est pas autorisée dans les préférences." + Globals.NL + - "• Amélioration des transcriptions suite à un changement pour mieux distinguer He, 'Het, H'ayin, T'et et Tav." + Globals.NL + - "• Quelques améliorations et corrections UI/UX." + Globals.NL + - "• Réorganisation et ajout de quelques liens Web." - }, - - ["9.28"] = new TranslationsDictionary - { - [Language.EN] = "• Add current day change when cursor changes line in text report." + Globals.NL + - "• Improve lunar month names by adding English transcription in addition to French." + Globals.NL + - "• Improve context menu of monthly view by disabling empty bookmarks in the Go To menu item." + Globals.NL + - "• Improve the setting of the number of bookmarks by limiting it to the last index defined." + Globals.NL + - "• Improve bookmark import to automatically extend the length to match." + Globals.NL + - "• Fix copy weekly parashah to clipboard to remove empty lines at the end." + Globals.NL + - "• Some data generation improvements and fixes." + Globals.NL + - "• Some UI/UX improvements and fixes." + Globals.NL + - "• Some fixes." + Globals.NL + - "• Some optimizations." + Globals.NL + - "• Massive refactorings with new code analyzers." + Globals.NL + - "• Improve setup to select hebrew font version." + Globals.NL + - "• Update Aish web links for parashot study.", - - [Language.FR] = "• Ajout du changement de jour actuel lorsque le curseur change de ligne dans le rapport texte." + Globals.NL + - "• Amélioration des noms des mois lunaires en ajoutant la transcription en anglais en plus du français." + Globals.NL + - "• Amélioration du menu contextuel de la vue mensuelle en désactivant les signets vides dans l'élément de menu Aller." + Globals.NL + - "• Amélioration du paramétrage du nombre de signets en le limitant au dernier index défini." + Globals.NL + - "• Amélioration de l'importation des signets pour étendre automatiquement la longueur pour correspondre." + Globals.NL + - "• Correction de la copie de la parashah hebdomadaire dans le presse-papiers pour supprimer les lignes vides à la fin." + Globals.NL + - "• Quelques améliorations et corrections de la génération des données." + Globals.NL + - "• Quelques améliorations et corrections de l'UI/UX." + Globals.NL + - "• Quelques correctifs." + Globals.NL + - "• Quelques optimisations." + Globals.NL + - "• Refactorisations massive avec de nouveaux analyseurs de code." + Globals.NL + - "• Amélioration du setup pour sélectionner la version de la fonte hébreu." + Globals.NL + - "• Mise à jour des liens Web Aish pour l'étude parashot." - }, - - ["9.27"] = new TranslationsDictionary - { - [Language.EN] = "• Code refactoring." + Globals.NL + - "• Fix open navigation window from calendar's context menu." + Globals.NL + - "• Fix order of controls in generation tab of preferences." + Globals.NL + - "• Disable IPC intercom for non-administrator users." + Globals.NL + - "• Update web links with more resources on Loubavitch." + Globals.NL + - "• Update web links with several changes." + Globals.NL + - "• Update FAQ and Help." + Globals.NL + - "• Add Hebrew font version available on Fonts2u(can be manually installed).", - - [Language.FR] = "• Refactorisation du code." + Globals.NL + - "• Correction de l'ouverture de la fenêtre de navigation depuis le menu contextuel du calendrier." + Globals.NL + - "• Correction de l'ordre des contrôles dans l'onglet génération des préférences." + Globals.NL + - "• Désactivation de l'inter-com IPC pour les utilisateurs non administrateurs." + Globals.NL + - "• Mise à jour les liens Web avec plus de ressources sur Loubavitch." + Globals.NL + - "• Mise à jour les liens Web avec plusieurs modifications." + Globals.NL + - "• Mise à jour la FAQ et l'aide." + Globals.NL + - "• Ajout de la version de police Hebrew disponible sur Fonts2u (peut être installée manuellement)." - }, - - ["9.24"] = new TranslationsDictionary - { - [Language.EN] = "• Fix Tetsaveh hebrew name and lettriq: parashot board need to be restored or edited, see ParashotFactory.txt and Parashot-Lettriqs.txt in application's document folder.", - - [Language.FR] = "• Correction du nom hébreu de Tetsaveh et de la lettrique : le tableau des parashot doit être restaurée ou édité, voir ParashotFactory.txt et Parashot-Lettriqs.txt dans le dossier de documents de l'application." - }, - ["9.x"] = new TranslationsDictionary { [Language.EN] = "• Added mouse hover effect in monthly view." + Globals.NL + diff --git a/Setup/OrdisoftwareHebrewCalendarSetup.iss b/Setup/OrdisoftwareHebrewCalendarSetup.iss index abe3bccf7..c721eec15 100644 --- a/Setup/OrdisoftwareHebrewCalendarSetup.iss +++ b/Setup/OrdisoftwareHebrewCalendarSetup.iss @@ -1,4 +1,4 @@ -#define MyAppVersion "9.34" +#define MyAppVersion "9.33" #define MyAppName "Hebrew Calendar" #define MyAppNameNoSpace "HebrewCalendar" #define MyAppExeName "Ordisoftware.Hebrew.Calendar.exe" From ba47ef232150bd91599819a9a017c9d7721af920 Mon Sep 17 00:00:00 2001 From: Olivier Rogier Date: Sun, 25 Sep 2022 05:14:20 +0200 Subject: [PATCH 3/5] Update file --- Project/App.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project/App.config b/Project/App.config index 57a658360..ad53e4000 100644 --- a/Project/App.config +++ b/Project/App.config @@ -742,11 +742,11 @@ - + - + From 3d3ad637eb81d525bf015242d858f95e99c875de Mon Sep 17 00:00:00 2001 From: Olivier Rogier Date: Sun, 25 Sep 2022 05:16:14 +0200 Subject: [PATCH 4/5] Refactor --- Project/Source/Forms/Boxes/Boards/ParashotForm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project/Source/Forms/Boxes/Boards/ParashotForm.cs b/Project/Source/Forms/Boxes/Boards/ParashotForm.cs index 08bbe5385..7550aec2f 100644 --- a/Project/Source/Forms/Boxes/Boards/ParashotForm.cs +++ b/Project/Source/Forms/Boxes/Boards/ParashotForm.cs @@ -347,7 +347,7 @@ private void DataGridView_DataError(object sender, DataGridViewDataErrorEventArg e.ThrowException = false; } - private KeysConverter KeysConverter = new(); + private readonly KeysConverter KeysConverter = new(); private void DataGridView_KeyDown(object sender, KeyEventArgs e) { From 4f79ad4ca0053687e03827ebf814b202899b6d1c Mon Sep 17 00:00:00 2001 From: Olivier Rogier Date: Sun, 25 Sep 2022 05:56:44 +0200 Subject: [PATCH 5/5] Refactor --- .../SysTranslations.Application.cs | 8 +++---- .../Common/Core/Globals/Globals.State.cs | 7 +++++- .../Hebrew/WinControls/LettersControl.cs | 5 ++--- .../Database/ApplicationDatabase.Generate.cs | 22 ++++++++++++++++++- .../Source/Forms/Boxes/Boards/ParashotForm.cs | 1 - .../Source/Forms/Config/PreferencesForm.cs | 3 +-- .../MainForm/Data/MainForm.Data.Create.cs | 20 ++--------------- .../Forms/MainForm/Data/MainForm.Data.Load.cs | 6 ++--- .../MainForm/Data/MainForm.FillMonths.cs | 8 +++++-- .../Forms/MainForm/UI/MainForm.GoToDate.cs | 5 +++-- .../Forms/MainForm/UI/MainForm.TrayIcon.cs | 6 ++--- .../Forms/MainForm/UI/MainForm.UpdateUI.cs | 13 ++++++----- .../AppTranslations.Celebrations.cs | 4 ++-- 13 files changed, 60 insertions(+), 48 deletions(-) diff --git a/Project/Source/Common/Core/Globalization/SysTranslations.Application.cs b/Project/Source/Common/Core/Globalization/SysTranslations.Application.cs index ff995c962..23f95efe3 100644 --- a/Project/Source/Common/Core/Globalization/SysTranslations.Application.cs +++ b/Project/Source/Common/Core/Globalization/SysTranslations.Application.cs @@ -11,7 +11,7 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2016-04 -/// 2022-06 +/// 2022-09 namespace Ordisoftware.Core; /// @@ -129,10 +129,10 @@ static public TranslationsDictionary ApplicationMustExit [Language.FR] = "Quitter l'application ?" }; - static public readonly TranslationsDictionary CantExitWhileGenerating = new() + static public readonly TranslationsDictionary CantExitWhileProcessing = new() { - [Language.EN] = "Can't exit application while generating data.", - [Language.FR] = "Impossible de quitter l'application durant la génération des données." + [Language.EN] = "Can't exit application while processing data.", + [Language.FR] = "Impossible de quitter l'application durant le traitement des données." }; static public readonly TranslationsDictionary AskToShutdownComputer = new() diff --git a/Project/Source/Common/Core/Globals/Globals.State.cs b/Project/Source/Common/Core/Globals/Globals.State.cs index fbc3a348a..c80bf0955 100644 --- a/Project/Source/Common/Core/Globals/Globals.State.cs +++ b/Project/Source/Common/Core/Globals/Globals.State.cs @@ -11,7 +11,7 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2016-04 -/// 2021-09 +/// 2022-09 namespace Ordisoftware.Core; /// @@ -45,6 +45,11 @@ static partial class Globals /// static public bool IsLoadingData { get; set; } + /// + /// Indicates if the application is in loading or rendering or generating data stage. + /// + static public bool IsProcessingData => IsLoadingData || IsRendering || IsGenerating; + /// /// Indicates if the application is ready to interact with the user or do its purpose. /// diff --git a/Project/Source/Common/Hebrew/WinControls/LettersControl.cs b/Project/Source/Common/Hebrew/WinControls/LettersControl.cs index d70808ade..c85c57939 100644 --- a/Project/Source/Common/Hebrew/WinControls/LettersControl.cs +++ b/Project/Source/Common/Hebrew/WinControls/LettersControl.cs @@ -11,7 +11,7 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2012-10 -/// 2022-07 +/// 2022-09 namespace Ordisoftware.Hebrew; public enum LettersControlFocusSelect @@ -563,7 +563,6 @@ private void ActionPaste_Click(object sender, EventArgs e) { Focus(LettersControlFocusSelect.All); TextBox.Text = Clipboard.GetText(); - //TextBoxEx.ActionPaste.PerformClick(); } private void ActionSearchOnline_Click(object sender, EventArgs e) @@ -599,7 +598,7 @@ public bool UpdateControls() internal void CheckClipboardContentType() { string strContent = Clipboard.GetText(); - ActionPaste.Enabled = !strContent.IsNullOrEmpty() /* TODO && strContent.Length <= Settings.HebrewTextBoxMaxLength*/; + ActionPaste.Enabled = !strContent.IsNullOrEmpty(); if ( ActionPaste.Enabled ) { var strLabel = HebrewAlphabet.IsValidUnicode(strContent) diff --git a/Project/Source/Database/ApplicationDatabase.Generate.cs b/Project/Source/Database/ApplicationDatabase.Generate.cs index 84d4c1f0b..a293ffdf5 100644 --- a/Project/Source/Database/ApplicationDatabase.Generate.cs +++ b/Project/Source/Database/ApplicationDatabase.Generate.cs @@ -11,7 +11,7 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2016-04 -/// 2022-03 +/// 2022-09 namespace Ordisoftware.Hebrew.Calendar; [Serializable] @@ -47,6 +47,26 @@ public bool AddGenerateErrorAndCheckIfTooMany(string method, string date, Except return LastGenerationErrors.Count >= MaxGenerateErrors; } + public string ShowLastGenerationErrors(string title) + { + string errors = LastGenerationErrors.AsMultiLine(); + LastGenerationErrors.Clear(); + errors = Settings.GetGPSText() + Globals.NL2 + errors; + DebugManager.Trace(LogTraceEvent.Error, errors); + using ( var form = new ShowTextForm(title, errors, + false, true, + MessageBoxEx.DefaultWidthLarge, MessageBoxEx.DefaultHeightLarge, + false, false) ) + { + form.TextBox.Font = new Font("Courier new", 8); + form.ShowDialog(); + } + if ( DisplayManager.QueryYesNo(SysTranslations.ContactSupport.GetLang()) ) + ExceptionForm.Run(new ExceptionInfo(this, new TooManyErrorsException(errors))); + return errors; + } + + /// /// Creates the days. /// diff --git a/Project/Source/Forms/Boxes/Boards/ParashotForm.cs b/Project/Source/Forms/Boxes/Boards/ParashotForm.cs index 7550aec2f..f63790903 100644 --- a/Project/Source/Forms/Boxes/Boards/ParashotForm.cs +++ b/Project/Source/Forms/Boxes/Boards/ParashotForm.cs @@ -332,7 +332,6 @@ private void EditFontSize_ValueChanged(object sender, EventArgs e) { DataGridView.Font = new Font("Microsoft Sans Serif", (float)EditFontSize.Value); ColumnHebrew.DefaultCellStyle.Font = new Font("Hebrew", (float)EditFontSize.Value + 5); - // TODO remove if ( DataGridView.Rows.Count > 0 ) DataGridView.ColumnHeadersHeight = DataGridView.Rows[0].Height + 5; } private void BindingSource_DataSourceChanged(object sender, EventArgs e) diff --git a/Project/Source/Forms/Config/PreferencesForm.cs b/Project/Source/Forms/Config/PreferencesForm.cs index 9e2e3daf9..7edb019e5 100644 --- a/Project/Source/Forms/Config/PreferencesForm.cs +++ b/Project/Source/Forms/Config/PreferencesForm.cs @@ -11,7 +11,7 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2016-04 -/// 2022-08 +/// 2022-09 namespace Ordisoftware.Hebrew.Calendar; using KVPDataExportTarget = KeyValuePair; @@ -29,7 +29,6 @@ partial class PreferencesForm : Form private bool IsReady; private bool InitialHotKeyEnabled; - // TODO refactor in a class or dictionary public int OldShabatDay { get; private set; } public string OldLatitude { get; private set; } public string OldLongitude { get; private set; } diff --git a/Project/Source/Forms/MainForm/Data/MainForm.Data.Create.cs b/Project/Source/Forms/MainForm/Data/MainForm.Data.Create.cs index 24eab8444..b704c4638 100644 --- a/Project/Source/Forms/MainForm/Data/MainForm.Data.Create.cs +++ b/Project/Source/Forms/MainForm/Data/MainForm.Data.Create.cs @@ -11,7 +11,7 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2016-04 -/// 2022-03 +/// 2022-09 namespace Ordisoftware.Hebrew.Calendar; partial class MainForm @@ -92,23 +92,7 @@ private string CreateData(int yearFirst, int yearLast) UpdateButtons(); } if ( ApplicationDatabase.Instance.LastGenerationErrors.Count != 0 ) - { - string errors = ApplicationDatabase.Instance.LastGenerationErrors.AsMultiLine(); - ApplicationDatabase.Instance.LastGenerationErrors.Clear(); - errors = Settings.GetGPSText() + Globals.NL2 + errors; - DebugManager.Trace(LogTraceEvent.Error, errors); - using ( var form = new ShowTextForm(Text, errors, - false, true, - MessageBoxEx.DefaultWidthLarge, MessageBoxEx.DefaultHeightLarge, - false, false) ) - { - form.TextBox.Font = new Font("Courier new", 8); - form.ShowDialog(); - } - if ( DisplayManager.QueryYesNo(SysTranslations.ContactSupport.GetLang()) ) - ExceptionForm.Run(new ExceptionInfo(this, new TooManyErrorsException(errors))); - return errors; - } + return ApplicationDatabase.Instance.ShowLastGenerationErrors(Text); return null; } diff --git a/Project/Source/Forms/MainForm/Data/MainForm.Data.Load.cs b/Project/Source/Forms/MainForm/Data/MainForm.Data.Load.cs index cbdd780f0..636a334f4 100644 --- a/Project/Source/Forms/MainForm/Data/MainForm.Data.Load.cs +++ b/Project/Source/Forms/MainForm/Data/MainForm.Data.Load.cs @@ -11,7 +11,7 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2019-01 -/// 2021-12 +/// 2022-09 namespace Ordisoftware.Hebrew.Calendar; partial class MainForm @@ -21,7 +21,7 @@ private void LoadData() { bool formEnabled = Enabled; ToolStrip.Enabled = false; - Globals.IsGenerating = true; + Globals.IsLoadingData = true; try { PanelTitleInner.Visible = true; @@ -50,7 +50,7 @@ private void LoadData() } finally { - Globals.IsGenerating = false; + Globals.IsLoadingData = false; LabelSubTitleGPS.Text = string.Empty; ToolStrip.Enabled = formEnabled; LoadDataEnd(); diff --git a/Project/Source/Forms/MainForm/Data/MainForm.FillMonths.cs b/Project/Source/Forms/MainForm/Data/MainForm.FillMonths.cs index f8312f846..81294c8da 100644 --- a/Project/Source/Forms/MainForm/Data/MainForm.FillMonths.cs +++ b/Project/Source/Forms/MainForm/Data/MainForm.FillMonths.cs @@ -11,10 +11,11 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2019-01 -/// 2022-06 +/// 2022-09 namespace Ordisoftware.Hebrew.Calendar; using CodeProjectCalendar.NET; +using CommandLine; partial class MainForm { @@ -236,12 +237,15 @@ void add(Color color, string text) catch ( Exception ex ) { if ( ApplicationDatabase.Instance.AddGenerateErrorAndCheckIfTooMany(nameof(FillMonths), row.DateAsString, ex) ) + { + if ( !Globals.IsGenerating && ApplicationDatabase.Instance.LastGenerationErrors.Count != 0 ) + ApplicationDatabase.Instance.ShowLastGenerationErrors(Text); return; + } } } finally { - // TODO show errors like with generate days Globals.ChronoShowData.Stop(); Settings.BenchmarkFillCalendar = Globals.ChronoShowData.ElapsedMilliseconds; SystemManager.TryCatch(Settings.Store); diff --git a/Project/Source/Forms/MainForm/UI/MainForm.GoToDate.cs b/Project/Source/Forms/MainForm/UI/MainForm.GoToDate.cs index 4d38ee2da..987741473 100644 --- a/Project/Source/Forms/MainForm/UI/MainForm.GoToDate.cs +++ b/Project/Source/Forms/MainForm/UI/MainForm.GoToDate.cs @@ -11,7 +11,7 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2016-04 -/// 2022-06 +/// 2022-09 namespace Ordisoftware.Hebrew.Calendar; partial class MainForm @@ -28,7 +28,8 @@ public void GoToDate(DateTime date, Form regetFocus = null, ViewScrollOverride scroll = ViewScrollOverride.None) { - if ( !Globals.IsReady || Globals.IsGenerating ) return; + if ( !Globals.IsReady ) return; + if ( Globals.IsProcessingData ) return; if ( GoToDateMutex ) return; if ( date < DateFirst ) date = DateFirst; if ( date > DateLast ) date = DateLast; diff --git a/Project/Source/Forms/MainForm/UI/MainForm.TrayIcon.cs b/Project/Source/Forms/MainForm/UI/MainForm.TrayIcon.cs index edc32bab6..943204727 100644 --- a/Project/Source/Forms/MainForm/UI/MainForm.TrayIcon.cs +++ b/Project/Source/Forms/MainForm/UI/MainForm.TrayIcon.cs @@ -11,7 +11,7 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2016-04 -/// 2022-06 +/// 2022-09 namespace Ordisoftware.Hebrew.Calendar; partial class MainForm @@ -125,9 +125,9 @@ public void DoMenuShowHide_Click(object sender, EventArgs e) private void DoMenuExit_Click(object sender, EventArgs e) { - if ( Globals.IsGenerating ) + if ( Globals.IsProcessingData ) { - DisplayManager.ShowInformation(SysTranslations.CantExitWhileGenerating.GetLang()); + DisplayManager.ShowInformation(SysTranslations.CantExitWhileProcessing.GetLang()); return; } if ( ( EditConfirmClosing.Checked && !Globals.IsSessionEnding ) diff --git a/Project/Source/Forms/MainForm/UI/MainForm.UpdateUI.cs b/Project/Source/Forms/MainForm/UI/MainForm.UpdateUI.cs index b538f6bd4..a5fa25fda 100644 --- a/Project/Source/Forms/MainForm/UI/MainForm.UpdateUI.cs +++ b/Project/Source/Forms/MainForm/UI/MainForm.UpdateUI.cs @@ -11,7 +11,7 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2016-04 -/// 2022-04 +/// 2022-09 namespace Ordisoftware.Hebrew.Calendar; /// @@ -89,7 +89,8 @@ private void DoScreenPosition(object sender, EventArgs e) /// private void UpdateTitles(bool force = false) { - if ( !Globals.IsReady || Globals.IsGenerating ) return; + if ( !Globals.IsReady ) return; + if ( Globals.IsProcessingData ) return; if ( UpdateTitlesMutex ) return; UpdateTitlesMutex = true; try @@ -179,8 +180,8 @@ public void UpdateButtons() SystemManager.TryCatchManage(() => { if ( LoadingForm.Instance.Visible ) LoadingForm.Instance.Hide(); - MenuTray.Enabled = Globals.IsReady && !Globals.IsGenerating; - ToolStrip.Enabled = !Globals.IsGenerating; + MenuTray.Enabled = Globals.IsReady && !Globals.IsProcessingData; + ToolStrip.Enabled = !Globals.IsProcessingData; ActionSaveToFile.Enabled = LunisolarDays.Count > 0; ActionCopyToClipboard.Enabled = ActionSaveToFile.Enabled; ActionPrint.Enabled = ActionSaveToFile.Enabled && Settings.CurrentView != ViewMode.Grid; @@ -198,7 +199,7 @@ public void UpdateButtons() /// public void UpdateCalendarMonth(bool doFill) { - Globals.IsGenerating = true; + Globals.IsRendering = true; var cursor = Cursor; Cursor = Cursors.WaitCursor; bool formEnabled = Enabled; @@ -213,7 +214,7 @@ public void UpdateCalendarMonth(bool doFill) { ToolStrip.Enabled = formEnabled; Cursor = cursor; - Globals.IsGenerating = false; + Globals.IsRendering = false; SetView(Settings.CurrentView, true); UpdateButtons(); } diff --git a/Project/Source/Program/Translations/AppTranslations.Celebrations.cs b/Project/Source/Program/Translations/AppTranslations.Celebrations.cs index cb1d0bf3d..6e803c12b 100644 --- a/Project/Source/Program/Translations/AppTranslations.Celebrations.cs +++ b/Project/Source/Program/Translations/AppTranslations.Celebrations.cs @@ -11,7 +11,7 @@ /// You may add additional accurate notices of copyright ownership. /// /// 2016-04 -/// 2022-06 +/// 2022-09 namespace Ordisoftware.Hebrew.Calendar; using static Ordisoftware.Hebrew.HebrewTranslations; @@ -126,7 +126,7 @@ static partial class AppTranslations [Language.EN] = TorahCelebrations[TorahCelebration.Soukot][Language.EN] + " " + End[Language.EN], [Language.FR] = TorahCelebrations[TorahCelebration.Soukot][Language.FR] + " " + End[Language.FR] } - // TODO Manage as user custom remind list + // TODO manage as user custom remind list /*[TorahCelebrationDay.HanoukaD1] = new TranslationsDictionary { [Language.EN] = "'Hanouka start",