Skip to content

Commit

Permalink
Merge pull request #55 from Ordisoftware/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Ordisoftware authored Aug 25, 2019
2 parents 53b12d6 + 0b757c9 commit a9e1524
Show file tree
Hide file tree
Showing 22 changed files with 1,350 additions and 431 deletions.
18 changes: 18 additions & 0 deletions Project/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,24 @@
<setting name="UpgradeRequired" serializeAs="String">
<value>True</value>
</setting>
<setting name="CurrentDayColor" serializeAs="String">
<value>Red</value>
</setting>
<setting name="TorahEventColor" serializeAs="String">
<value>DarkRed</value>
</setting>
<setting name="SeasonEventColor" serializeAs="String">
<value>DarkGreen</value>
</setting>
<setting name="MoonEventColor" serializeAs="String">
<value>DarkBlue</value>
</setting>
<setting name="FullMoonColor" serializeAs="String">
<value>DarkGoldenrod</value>
</setting>
<setting name="Paramètre" serializeAs="String">
<value />
</setting>
</Ordisoftware.HebrewCalendar.Properties.Settings>
</userSettings>
<startup>
Expand Down
6 changes: 5 additions & 1 deletion Project/Dependencies/Calendar.NET/Calendar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public class Calendar : UserControl
private const int MarginSize = 10;
// ORDISOFTWARE MODIF END

// ORDISOFTWARE MODIF BEGIN
public Color CurrentDayColor = Color.Red;
// ORDISOFTWARE MODIF END

/// <summary>
/// Indicates the font for the times on the day view
/// </summary>
Expand Down Expand Up @@ -979,7 +983,7 @@ private void RenderMonthCalendar(PaintEventArgs e)
{
//ORDISOFTWARE MODIF BEGIN
//g.DrawString(counter.ToString(CultureInfo.InvariantCulture), _todayFont, Brushes.Black, xStart + 5, yStart + 2);
g.DrawString(counter.ToString(CultureInfo.InvariantCulture), _todayFont, Brushes.DarkRed, xStart + 5, yStart + 2);
g.DrawString(counter.ToString(CultureInfo.InvariantCulture), _todayFont, new SolidBrush(CurrentDayColor), xStart + 5, yStart + 2);
//ORDISOFTWARE MODIF END
}
else
Expand Down
4 changes: 4 additions & 0 deletions Project/Hebrew Calendar (vs2017).csproj
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@
<EmbeddedResource Include="Source\Forms\MainForm.fr.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Source\Forms\PreferencesForm.fr-FR.resx">
<DependentUpon>PreferencesForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Source\Forms\PreferencesForm.fr.resx">
<DependentUpon>PreferencesForm.cs</DependentUpon>
</EmbeddedResource>
Expand All @@ -292,6 +295,7 @@
</EmbeddedResource>
<EmbeddedResource Include="Source\Forms\MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Source\Forms\PreferencesForm.resx">
<DependentUpon>PreferencesForm.cs</DependentUpon>
Expand Down
4 changes: 2 additions & 2 deletions Project/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.9.0.0")]
[assembly: AssemblyFileVersion("1.9.0.0")]
[assembly: AssemblyVersion("1.10.0.0")]
[assembly: AssemblyFileVersion("1.10.0.0")]
71 changes: 71 additions & 0 deletions Project/Properties/Settings.Designer.cs

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

18 changes: 18 additions & 0 deletions Project/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,23 @@
<Setting Name="UpgradeRequired" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="CurrentDayColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Red</Value>
</Setting>
<Setting Name="TorahEventColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">DarkRed</Value>
</Setting>
<Setting Name="SeasonEventColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">DarkGreen</Value>
</Setting>
<Setting Name="MoonEventColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">DarkBlue</Value>
</Setting>
<Setting Name="FullMoonColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">DarkGoldenrod</Value>
</Setting>
<Setting Name="Paramètre" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>
7 changes: 7 additions & 0 deletions Project/Source/Classes/Localizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@ static public readonly Dictionary<string, string> ReplaceCalendarText
"Voulez-vous continuer ?" }
};

static public readonly Dictionary<string, string> NavigationDayText
= new Dictionary<string, string>()
{
{ "en", "Day #" },
{ "fr", "Jour #" }
};

static public readonly Dictionary<MoonPhaseType, Dictionary<string, string>> MoonPhaseText
= new Dictionary<MoonPhaseType, Dictionary<string, string>>()
{
Expand Down
20 changes: 15 additions & 5 deletions Project/Source/Classes/SettingsHelper.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> 2016-04 </edited>
/// <edited> 2019-08 </edited>
using System;
using System.Windows.Forms;
using Ordisoftware.HebrewCalendar.Properties;
Expand Down Expand Up @@ -82,8 +82,13 @@ static internal void Retrieve(this Settings settings)
PreferencesForm.Instance.PanelTopColor.BackColor = settings.NavigateTopColor;
PreferencesForm.Instance.PanelMiddleColor.BackColor = settings.NavigateMiddleColor;
PreferencesForm.Instance.PanelBottomColor.BackColor = settings.NavigateBottomColor;
PreferencesForm.Instance.PanelTextColor.BackColor = settings.TextColor;
PreferencesForm.Instance.PanelBackColor.BackColor = settings.TextBackground;
PreferencesForm.Instance.PanelTextColor2.BackColor = settings.TextColor;
PreferencesForm.Instance.PanelBackColor2.BackColor = settings.TextBackground;
PreferencesForm.Instance.PanelCurrentDayColor.BackColor = settings.CurrentDayColor;
PreferencesForm.Instance.PanelTorahEventColor.BackColor = settings.TorahEventColor;
PreferencesForm.Instance.PanelSeasonEventColor.BackColor = settings.SeasonEventColor;
PreferencesForm.Instance.PanelMoonEventColor.BackColor = settings.MoonEventColor;
PreferencesForm.Instance.PanelFullMoonColor.BackColor = settings.FullMoonColor;
}

/// <summary>
Expand Down Expand Up @@ -113,8 +118,13 @@ static internal void Store(this Settings settings)
settings.NavigateTopColor = PreferencesForm.Instance.PanelTopColor.BackColor;
settings.NavigateMiddleColor = PreferencesForm.Instance.PanelMiddleColor.BackColor;
settings.NavigateBottomColor = PreferencesForm.Instance.PanelBottomColor.BackColor;
settings.TextColor = PreferencesForm.Instance.PanelTextColor.BackColor;
settings.TextBackground = PreferencesForm.Instance.PanelBackColor.BackColor;
settings.TextColor = PreferencesForm.Instance.PanelTextColor2.BackColor;
settings.TextBackground = PreferencesForm.Instance.PanelBackColor2.BackColor;
settings.CurrentDayColor = PreferencesForm.Instance.PanelCurrentDayColor.BackColor;
settings.TorahEventColor = PreferencesForm.Instance.PanelTorahEventColor.BackColor;
settings.SeasonEventColor = PreferencesForm.Instance.PanelSeasonEventColor.BackColor;
settings.MoonEventColor = PreferencesForm.Instance.PanelMoonEventColor.BackColor;
settings.FullMoonColor = PreferencesForm.Instance.PanelFullMoonColor.BackColor;
settings.Save();
}

Expand Down
4 changes: 2 additions & 2 deletions Project/Source/Forms/MainForm.Designer.cs

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

12 changes: 6 additions & 6 deletions Project/Source/Forms/MainForm.FillMonths.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> 2019-01 </created>
/// <edited> 2019-01 </edited>
/// <edited> 2019-08 </edited>
using System;
using System.Drawing;
using Calendar.NET;
Expand All @@ -22,7 +22,7 @@ namespace Ordisoftware.HebrewCalendar
public partial class MainForm
{

private void FillMonths()
internal void FillMonths()
{
string strToolTip = "Error on getting sun rise and set";
int progress = 0;
Expand Down Expand Up @@ -51,8 +51,8 @@ void add(Color color, string text)
? " " + Localizer.BabylonianHebrewMonthText[row.LunarMonth]
: "";
colorMoon = row.IsNewMoon == 1
? Color.DarkRed
: ( row.IsFullMoon == 1 ? Color.DarkGoldenrod : Color.DarkBlue );
? Program.Settings.TorahEventColor
: ( row.IsFullMoon == 1 ? Program.Settings.FullMoonColor : Program.Settings.MoonEventColor );
if ( (MoonriseType)row.MoonriseType == MoonriseType.AfterSet )
{
if ( row.Moonset != "" ) add(Color.Black, Localizer.EphemerisText.GetLang(EphemerisType.Set) + row.Moonset);
Expand All @@ -66,9 +66,9 @@ void add(Color color, string text)
if ( row.Moonset != "" ) add(Color.Black, Localizer.EphemerisText.GetLang(EphemerisType.Set) + row.Moonset);
}
if ( row.SeasonChange != 0 )
add(Color.DarkGreen, Localizer.SeasonEventText.GetLang((SeasonChangeType)row.SeasonChange));
add(Program.Settings.SeasonEventColor, Localizer.SeasonEventText.GetLang((SeasonChangeType)row.SeasonChange));
if ( row.TorahEvents != 0 )
add(Color.DarkRed, Localizer.TorahEventText.GetLang((TorahEventType)row.TorahEvents));
add(Program.Settings.TorahEventColor, Localizer.TorahEventText.GetLang((TorahEventType)row.TorahEvents));
}
}

Expand Down
3 changes: 2 additions & 1 deletion Project/Source/Forms/MainForm.LoadData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ public partial class MainForm

private void LoadData()
{

int progress = 0;
void update(object tableSender, DataRowChangeEventArgs tableEvent)
{
if ( !IsGenerating ) UpdateProgress(progress++, Count, Localizer.LoadingDataText.GetLang());
};
LunisolarCalendar.LunisolarDays.RowChanged += update;
Cursor = Cursors.WaitCursor;
Enabled = false;
try
{
SQLiteUtility.CreateDatabaseIfNotExists();
Expand Down Expand Up @@ -79,6 +79,7 @@ void update(object tableSender, DataRowChangeEventArgs tableEvent)
}
finally
{
Enabled = true;
Cursor = Cursors.Default;
LunisolarCalendar.LunisolarDays.RowChanged -= update;
SetView(Program.Settings.CurrentView, true);
Expand Down
4 changes: 2 additions & 2 deletions Project/Source/Forms/MainForm.Update.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> 2016-04 </edited>
/// <edited> 2019-08 </edited>
using System;
using System.Drawing;
using System.Windows.Forms;
Expand Down Expand Up @@ -43,7 +43,7 @@ private bool UpdateProgress(int index, int count, string text)
/// <summary>
/// Update the buttons.
/// </summary>
private void UpdateButtons()
internal void UpdateButtons()
{
try
{
Expand Down
3 changes: 2 additions & 1 deletion Project/Source/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static MainForm()
/// <summary>
/// Indicate if generation is in progress.
/// </summary>
private bool IsGenerating = false;
internal bool IsGenerating = false;

/// <summary>
/// Indicate if application can be closed.
Expand All @@ -77,6 +77,7 @@ private MainForm()
SystemEvents.SessionEnding += SessionEnding;
CalendarText.ForeColor = Program.Settings.TextColor;
CalendarText.BackColor = Program.Settings.TextBackground;
CalendarMonth.CurrentDayColor = Program.Settings.CurrentDayColor;
CalendarMonth.CalendarDateChanged += (date) =>
{
NavigationForm.Instance.Date = date;
Expand Down
Loading

0 comments on commit a9e1524

Please sign in to comment.