-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Month aggregate time display in calendar
New Tray icon when recording Ability to filter projects for Export
- Loading branch information
1 parent
ed1efb0
commit 02f572d
Showing
14 changed files
with
271 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Data; | ||
using System.Windows.Media; | ||
using Humanizer; | ||
using Humanizer.Localisation; | ||
using QBTracker.DataAccess; | ||
|
||
namespace QBTracker.Converters | ||
{ | ||
internal class MonthTimeConverter : IMultiValueConverter | ||
{ | ||
public MonthTimeConverter() | ||
{ | ||
this.Repository = (IRepository)Application.Current.Resources["Repository"]; | ||
} | ||
|
||
private IRepository Repository { get; } | ||
|
||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
var date = (DateTime)values[0]; | ||
var timeAggregate = Repository.GetDayAggregatedMonthTime(date); | ||
return timeAggregate.Humanize(2, maxUnit:TimeUnit.Hour, minUnit: TimeUnit.Minute); | ||
} | ||
|
||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) | ||
{ | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace QBTracker.Model; | ||
|
||
public class TimeAggregate | ||
{ | ||
public int Id { get; set; } | ||
public int Year { get; set; } | ||
public int Month { get; set; } | ||
public TimeSpan AggregateTime { get; set; } | ||
public TimeSpan[] DayAggregate { get; set; } = new TimeSpan[31]; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.