Skip to content

Commit

Permalink
Merge pull request #121 from Ordisoftware/dev
Browse files Browse the repository at this point in the history
Improve UI
  • Loading branch information
Ordisoftware authored Oct 16, 2019
2 parents 464c34e + 910d559 commit 57e2dfe
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Project/Source/Forms/Boxes/SelectDayForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ private void ButtonOk_Click(object sender, EventArgs e)
private void MonthCalendar_DateChanged(object sender, DateRangeEventArgs e)
{
string date = SQLiteUtility.GetDate(MonthCalendar.SelectionStart);
var row = ( from day in MainForm.Instance.LunisolarCalendar.LunisolarDays
where day.Date == date
select day ).FirstOrDefault();
if ( row == null ) return;
MainForm.Instance.GoToDate(SQLiteUtility.GetDate(row.Date));
if ( MonthCalendar.SelectionStart < MainForm.Instance.DateFirst )
date = SQLiteUtility.GetDate(MainForm.Instance.DateFirst);
else
if ( MonthCalendar.SelectionStart > MainForm.Instance.DateLast )
date = SQLiteUtility.GetDate(MainForm.Instance.DateLast);
MainForm.Instance.GoToDate(SQLiteUtility.GetDate(date));
}

}
Expand Down

0 comments on commit 57e2dfe

Please sign in to comment.