2021-05-13 20:03:07 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using TINK.Model.Connector;
|
|
|
|
|
using TINK.ViewModel.Map;
|
|
|
|
|
using TINK.ViewModel.Settings;
|
|
|
|
|
|
|
|
|
|
namespace TINK.Model
|
|
|
|
|
{
|
|
|
|
|
/// <summary> Holds collecion of filters to filter options (TINK, Konrad, ....). </summary>
|
|
|
|
|
/// <remarks> Former name: FilterCollection.</remarks>
|
2022-08-30 15:42:25 +02:00
|
|
|
|
public static class GroupFilterHelper
|
2021-05-13 20:03:07 +02:00
|
|
|
|
{
|
|
|
|
|
/// <summary> Gets default filter set.</summary>
|
|
|
|
|
public static IGroupFilterSettings GetSettingsFilterDefaults
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return new GroupFilterSettings(new Dictionary<string, FilterState> {
|
2022-01-04 18:54:03 +01:00
|
|
|
|
{ FilterHelper.CARGOBIKE, FilterState.On },
|
|
|
|
|
{FilterHelper.CITYBIKE, FilterState.On }
|
2021-05-13 20:03:07 +02:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary> Gets default filter set.</summary>
|
|
|
|
|
public static IGroupFilterMapPage GetMapPageFilterDefaults
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2021-11-07 21:28:13 +01:00
|
|
|
|
return new GroupFilterMapPage(new Dictionary<string, FilterState> {
|
2022-01-04 18:54:03 +01:00
|
|
|
|
{ FilterHelper.CARGOBIKE, FilterState.On },
|
|
|
|
|
{FilterHelper.CITYBIKE, FilterState.Off }
|
2021-05-13 20:03:07 +02:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary> Holds value whether filter (on TINK, Konrad, ....) is on or off. </summary>
|
|
|
|
|
public enum FilterState
|
|
|
|
|
{
|
|
|
|
|
/// <summary> Option (TINK, Konrad, ....) is available.</summary>
|
|
|
|
|
On,
|
|
|
|
|
/// <summary> Option is off</summary>
|
|
|
|
|
Off,
|
|
|
|
|
}
|
|
|
|
|
}
|