sharee.bike-App/SharedBusinessLogic/Model/GroupFilterHelper.cs

46 lines
1.2 KiB
C#
Raw Normal View History

2023-04-19 12:14:14 +02:00
using System.Collections.Generic;
2024-04-09 12:53:23 +02:00
using ShareeBike.Model.Connector;
using ShareeBike.ViewModel.Map;
using ShareeBike.ViewModel.Settings;
2021-05-13 20:03:07 +02:00
2024-04-09 12:53:23 +02:00
namespace ShareeBike.Model
2021-05-13 20:03:07 +02:00
{
2024-04-09 12:53:23 +02:00
/// <summary> Holds collection of filters to filter options (Cargo, Citybike, ....). </summary>
2022-09-06 16:08:19 +02:00
/// <remarks> Former name: FilterCollection.</remarks>
public static class GroupFilterHelper
{
/// <summary> Gets default filter set.</summary>
public static IGroupFilterSettings GetSettingsFilterDefaults
{
get
{
return new GroupFilterSettings(new Dictionary<string, FilterState> {
{ FilterHelper.CARGOBIKE, FilterState.On },
{FilterHelper.CITYBIKE, FilterState.On }
});
}
}
2021-05-13 20:03:07 +02:00
2022-09-06 16:08:19 +02:00
/// <summary> Gets default filter set.</summary>
public static IGroupFilterMapPage GetMapPageFilterDefaults
{
get
{
return new GroupFilterMapPage(new Dictionary<string, FilterState> {
{ FilterHelper.CARGOBIKE, FilterState.On },
{FilterHelper.CITYBIKE, FilterState.Off }
});
}
}
}
2021-05-13 20:03:07 +02:00
2024-04-09 12:53:23 +02:00
/// <summary> Holds value whether filter (on Cargo, Citybike, ....) is on or off. </summary>
2022-09-06 16:08:19 +02:00
public enum FilterState
{
2024-04-09 12:53:23 +02:00
/// <summary> Option (Cargo, Citybike, ....) is available.</summary>
2022-09-06 16:08:19 +02:00
On,
/// <summary> Option is off</summary>
Off,
}
2021-05-13 20:03:07 +02:00
}