Skip to content

Commit

Permalink
Merge pull request #282 from Ordisoftware/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Ordisoftware committed Sep 25, 2022
2 parents 6018d72 7a5547a commit bc4aaf8
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Project/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -583,11 583,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SQLitePCLRaw.core" publicKeyToken="1488e028ca7ab535" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.1.1705" newVersion="2.1.1.1705" />
<bindingRedirect oldVersion="0.0.0.0-2.1.2.1721" newVersion="2.1.2.1721" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SQLitePCLRaw.batteries_v2" publicKeyToken="8226ea5df37bcae9" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.1.1705" newVersion="2.1.1.1705" />
<bindingRedirect oldVersion="0.0.0.0-2.1.2.1721" newVersion="2.1.2.1721" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 11,7 @@
/// You may add additional accurate notices of copyright ownership.
/// </license>
/// <created> 2016-04 </created>
/// <edited> 2022-06 </edited>
/// <edited> 2022-09 </edited>
namespace Ordisoftware.Core;

/// <summary>
Expand Down Expand Up @@ -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()
Expand Down
7 changes: 6 additions & 1 deletion Project/Source/Common/Core/Globals/Globals.State.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 11,7 @@
/// You may add additional accurate notices of copyright ownership.
/// </license>
/// <created> 2016-04 </created>
/// <edited> 2021-09 </edited>
/// <edited> 2022-09 </edited>
namespace Ordisoftware.Core;

/// <summary>
Expand Down Expand Up @@ -45,6 45,11 @@ static partial class Globals
/// </summary>
static public bool IsLoadingData { get; set; }

/// <summary>
/// Indicates if the application is in loading or rendering or generating data stage.
/// </summary>
static public bool IsProcessingData => IsLoadingData || IsRendering || IsGenerating;

/// <summary>
/// Indicates if the application is ready to interact with the user or do its purpose.
/// </summary>
Expand Down
5 changes: 2 additions & 3 deletions Project/Source/Common/Hebrew/WinControls/LettersControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 11,7 @@
/// You may add additional accurate notices of copyright ownership.
/// </license>
/// <created> 2012-10 </created>
/// <edited> 2022-07 </edited>
/// <edited> 2022-09 </edited>
namespace Ordisoftware.Hebrew;

public enum LettersControlFocusSelect
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Project/Source/Database/VerseRow.ToString.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 17,7 @@ namespace Ordisoftware.Hebrew.Words;
public partial class VerseRow
{

// TODO debug error null after changing language and go to filtered verse (need to reload combox or update bindinge ?)
// TODO debug error null after changing lang and go to filtered verse (need to reload combox or update bindings ?)
public string NumberFormatted
=> FormatNumber(ApplicationDatabase.Instance.Chapters.Find(c => c.ID == ChapterID)?.Verses?.Count ?? 0);

Expand Down
3 changes: 1 addition & 2 deletions Project/Source/Forms/Boxes/ParashotForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 331,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)
Expand All @@ -346,7 345,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)
{
Expand Down
1 change: 0 additions & 1 deletion Project/Source/Forms/Config/PreferencesForm.Initialize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 122,6 @@ private void LoadEditIntervals()
setInterval(EditPageHeight, LabelPageHeightIntervalInfo, DocumentPageHeightInterval);
setInterval(EditDocumentWordColumnsCount, LabelDocumentWordColumnsCountIntervalInfo, DocumentWordColumnsCountInterval);
setInterval(EditWordTranslateLinesCount, LabelWordtranslateLinesCountInfo, WordTranslationLinesCountInterval);
// TODO setInterval(EditPrintingMargin, LabelPrintingMarginIntervalInfo, PrintingMarginInterval);
//
static void setInterval(NumericUpDown control, Label label, (int, int, int, int) interval)
{
Expand Down
1 change: 0 additions & 1 deletion Project/Source/Forms/MainForm/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 275,6 @@ internal void ActionPreferences_Click(object sender, EventArgs e)
CreateFilterDataSource();
SelectSearchInBook.DataSource = new BindingList<BookRow>(ApplicationDatabase.Instance.Books);
UpdateCurrentReference();
// TODO reconstruct search query
RenderAll(true);
VerseControl.ResetMetricsRequired = true;
WordControl.ResetMetricsRequired = true;
Expand Down
6 changes: 3 additions & 3 deletions Project/Source/Program/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 107,9 @@ private static void CheckSettingsReset(bool force = false)
Settings.SetFirstAndUpgradeFlagsOff();
Settings.VacuumAtStartup = true;
Settings.CurrentView = ViewMode.ChapterVerses;
Settings.VerseCommentaryLinesCount = 5; // TODO update from default setting
Settings.VerseWordTranslationLinesCount = 2; // TODO update from default setting
Settings.WordControlWidth = 210; // TODO update from default setting
Settings.VerseCommentaryLinesCount = (int)Settings.Properties["VerseCommentaryLinesCount"].DefaultValue;
Settings.VerseWordTranslationLinesCount = (int)Settings.Properties["VerseWordTranslationLinesCount"].DefaultValue;
Settings.WordControlWidth = (int)Settings.Properties["WordControlWidth"].DefaultValue;
if ( Settings.SearchOnlineURL == "https://www.google.com/search?q=strong hebrew " )
Settings.SearchOnlineURL = "https://www.pealim.com/search/?q=%WORD%";
}
Expand Down
7 changes: 7 additions & 0 deletions Project/Source/Program/Translations/AppTranslations.News.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 29,13 @@ static partial class AppTranslations
static public readonly NullSafeDictionary<string, TranslationsDictionary> NoticeNewFeatures = new()
{

["3.14"] = 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."
},

["3.12"] = new TranslationsDictionary
{
[Language.EN] = "• Add translated word filter to the window of verses by updated date.",
Expand Down

0 comments on commit bc4aaf8

Please sign in to comment.