Skip to content

Commit

Permalink
Merge pull request #928 from Ordisoftware/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Ordisoftware authored Oct 8, 2021
2 parents c50b7e2 + e5f9d4a commit 5e8cf9b
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 26 deletions.
12 changes: 11 additions & 1 deletion Project/Source/Forms/Boxes/Boards/CelebrationVersesBoardForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ public partial class CelebrationVersesBoardForm : Form

static public CelebrationVersesBoardForm Instance { get; private set; }

static public void Run(DateTime date)
{
var row = ApplicationDatabase.Instance
.LunisolarDays
.FirstOrDefault(day => day.Date >= date
&& TorahCelebrationSettings.MajorEvents.Contains(day.TorahEvent));
Run(row?.TorahEvent ?? TorahCelebrationDay.None);
}

static public void Run(TorahCelebrationDay celebration = TorahCelebrationDay.None)
{
if ( Instance == null )
Expand Down Expand Up @@ -121,8 +130,9 @@ private void FindCurrentCelebration(TorahCelebrationDay celebration = TorahCeleb
celebration = TorahCelebrationDay.PessahD1;
if ( celebration != TorahCelebrationDay.None )
{
string str = celebration.ToString();
foreach ( ListViewItem item in SelectCelebration.Items )
if ( celebration.ToString().StartsWith(( (TorahCelebration)item.Tag ).ToString()) )
if ( str.StartsWith(( (TorahCelebration)item.Tag ).ToString()) )
{
item.Selected = true;
item.Focused = true;
Expand Down
16 changes: 8 additions & 8 deletions Project/Source/Forms/Boxes/Reminder/ReminderForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Project/Source/Forms/Boxes/Reminder/ReminderForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private void ReminderForm_Load(object sender, EventArgs e)
PowerAction[] avoid = { PowerAction.LogOff, PowerAction.Restart };
foreach ( var value in SystemManager.GetAvailablePowerActions().Where(a => !avoid.Contains(a)) )
{
var item = (ToolStripMenuItem)ContextMenuStripLockout.Items.Add(SysTranslations.PowerActionText.GetLang(value));
var item = (ToolStripMenuItem)ContextMenuLockout.Items.Add(SysTranslations.PowerActionText.GetLang(value));
item.Tag = value;
item.Click += (_s, _e) =>
{
Expand Down Expand Up @@ -395,7 +395,7 @@ private void ActionViewParashot_Click(object sender, EventArgs e)

private void ActionLockout_Click(object sender, EventArgs e)
{
ContextMenuStripLockout.Show(ActionLockout, new Point(0, ActionLockout.Height));
ContextMenuLockout.Show(ActionLockout, new Point(0, ActionLockout.Height));
}

#endregion
Expand Down
10 changes: 5 additions & 5 deletions Project/Source/Forms/Boxes/Reminder/ReminderForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@
<data name="&gt;&gt;ActionLockout.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<metadata name="ContextMenuStripLockout.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="ContextMenuLockout.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>192, 17</value>
</metadata>
<data name="MenuDefaultLockout.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand All @@ -658,13 +658,13 @@
<data name="MenuDefaultLockout.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="ContextMenuStripLockout.Size" type="System.Drawing.Size, System.Drawing">
<data name="ContextMenuLockout.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 26</value>
</data>
<data name="&gt;&gt;ContextMenuStripLockout.Name" xml:space="preserve">
<value>ContextMenuStripLockout</value>
<data name="&gt;&gt;ContextMenuLockout.Name" xml:space="preserve">
<value>ContextMenuLockout</value>
</data>
<data name="&gt;&gt;ContextMenuStripLockout.Type" xml:space="preserve">
<data name="&gt;&gt;ContextMenuLockout.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="ActionSetupSound.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
Expand Down
6 changes: 2 additions & 4 deletions Project/Source/Forms/MainForm/MainForm.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> 2021-10 </edited>
using System;
using System.Linq;
using System.Drawing;
Expand Down Expand Up @@ -1074,9 +1074,7 @@ private void ContextMenuDayNavigation_Click(object sender, EventArgs e)

private void ContextMenuDayCelebrationVersesBoard_Click(object sender, EventArgs e)
{
var dayNext = LunisolarDays.FirstOrDefault(day => day.Date >= ContextMenuDayCurrentEvent.Date
&& TorahCelebrationSettings.MajorEvents.Contains(day.TorahEvent));
CelebrationVersesBoardForm.Run(dayNext?.TorahEvent ?? TorahCelebrationDay.None);
CelebrationVersesBoardForm.Run(ContextMenuDayCurrentEvent.Date);
}

private void ContextMenuDayParashah_Click(object sender, EventArgs e)
Expand Down
8 changes: 4 additions & 4 deletions Project/Source/Program/Translations/AppTranslations.News.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ static public readonly NullSafeDictionary<string, TranslationsDictionary> Notice

["9.8"] = new TranslationsDictionary
{
[Language.EN] = "• Added celebration context menu to open verses board from navigation window." + Globals.NL +
"• Fixed main form title bar refresh." + Globals.NL +
[Language.EN] = "• Fixed main form title bar refresh." + Globals.NL +
"• Fixed open all links count." + Globals.NL +
"• Code refactoring." + Globals.NL +
"• Updated and reorganize web links.",

[Language.FR] = "• Ajout d'un menu contextuel de célébration pour ouvrir le tableau des versets depuis la fenêtre de navigation." + Globals.NL +
"• Correction de la mise à jour du titre de la fenêtre principale." + Globals.NL +
[Language.FR] = "• Correction de la mise à jour du titre de la fenêtre principale." + Globals.NL +
"• Correction du nombre de tous les liens à ouvrir." + Globals.NL +
"• Refactorisation de code." + Globals.NL +
"• Mise à jour et réorganisation des liens Web."
},

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,8 @@ The generation of parashot relating to Shabatot is not guaranteed to be traditio

## Changelog

#### 2021.10.10 - Version 9.8
#### 2021.10.08 - Version 9.8

- Add celebration context menu to open verses board from navigation window.
- Fix main form title bar refresh.
- Fix open all links count.
- Code refactoring.
Expand Down

0 comments on commit 5e8cf9b

Please sign in to comment.