mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-21 21:46:27 +02:00
Version 3.0.260
This commit is contained in:
parent
5a26bf273b
commit
4df8aa98aa
134 changed files with 8098 additions and 567 deletions
|
@ -66,5 +66,10 @@ namespace TINK.ViewModel.Bikes.Bike
|
|||
=> !double.IsNaN(Tariff.FeeEuroPerHour)
|
||||
? string.Format("{0} {1}", Tariff.MaxFeeEuroPerDay.ToString("0.00"), AppResources.MessageBikesManagementMaxFeeEuroPerDay)
|
||||
: string.Empty;
|
||||
|
||||
/// <summary> Info about operator agb as HTML (i.g. text and hyperlink). </summary>
|
||||
public string OperatorAgb => !string.IsNullOrEmpty(Tariff?.OperatorAgb)
|
||||
? Tariff.OperatorAgb
|
||||
: string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace TINK.ViewModel.Map
|
|||
{
|
||||
return this.Where(x => x.Value == FilterState.On).Select(x => x.Key).ToList();
|
||||
}
|
||||
|
||||
/// <summary> Performs filtering on response-group. </summary>
|
||||
public IEnumerable<string> DoFilter(IEnumerable<string> filter = null) => Filter.DoFilter(filter);
|
||||
|
||||
|
@ -41,20 +42,11 @@ namespace TINK.ViewModel.Map
|
|||
|
||||
public bool IsReadOnly => true;
|
||||
|
||||
public void Add(string key, FilterState value)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
public void Add(string key, FilterState value) => throw new System.NotImplementedException();
|
||||
|
||||
public void Add(KeyValuePair<string, FilterState> item) => throw new System.NotImplementedException();
|
||||
|
||||
public void Add(KeyValuePair<string, FilterState> item)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
public void Clear() => throw new System.NotImplementedException();
|
||||
|
||||
public bool Contains(KeyValuePair<string, FilterState> item) => FilterDictionary.Contains(item);
|
||||
|
||||
|
@ -64,15 +56,9 @@ namespace TINK.ViewModel.Map
|
|||
|
||||
public IEnumerator<KeyValuePair<string, FilterState>> GetEnumerator() => FilterDictionary.GetEnumerator();
|
||||
|
||||
public bool Remove(string key)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
public bool Remove(string key) => throw new System.NotImplementedException();
|
||||
|
||||
public bool Remove(KeyValuePair<string, FilterState> item)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
public bool Remove(KeyValuePair<string, FilterState> item) => throw new System.NotImplementedException();
|
||||
|
||||
public bool TryGetValue(string key, out FilterState value) => FilterDictionary.TryGetValue(key, out value);
|
||||
|
||||
|
|
|
@ -3,7 +3,9 @@ using TINK.Model;
|
|||
|
||||
namespace TINK.ViewModel.Map
|
||||
{
|
||||
public interface IGroupFilterMapPage : IDictionary<string, FilterState>
|
||||
/// <summary> Interface for filtering. </summary>
|
||||
/// <remarks> Holds a dictionary of filters which might or might not be appield depending on filter state.</remarks>
|
||||
public interface IGroupFilterMapPage : IDictionary<string /* Filter*/, FilterState /* on or off*/>
|
||||
{
|
||||
/// <summary> Performs filtering on response-group. </summary>
|
||||
IEnumerable<string> DoFilter(IEnumerable<string> filter = null);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using System.Linq;
|
||||
using TINK.Model;
|
||||
using TINK.Model.Connector;
|
||||
using TINK.Model.Connector.Filter;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace TINK.ViewModel.Map
|
||||
|
@ -28,21 +29,21 @@ namespace TINK.ViewModel.Map
|
|||
}
|
||||
|
||||
/// <summary> Gets value whether TINK is enabled or not. </summary>
|
||||
public bool IsTinkEnabled => !string.IsNullOrEmpty(CurrentFilter) && CurrentFilter != FilterHelper.FILTERTINKGENERAL;
|
||||
public bool IsTinkEnabled => !string.IsNullOrEmpty(CurrentFilter) && CurrentFilter.GetBikeCategory() != FilterHelper.FILTERTINKGENERAL;
|
||||
|
||||
/// <summary> Gets color of the TINK button. </summary>
|
||||
public Color TinkColor => CurrentFilter == FilterHelper.FILTERTINKGENERAL ? Color.Blue : Color.Gray;
|
||||
public Color TinkColor => CurrentFilter.GetBikeCategory() == FilterHelper.FILTERTINKGENERAL ? Color.Blue : Color.Gray;
|
||||
|
||||
/// <summary> Gets value whether Konrad is enabled or not. </summary>
|
||||
public bool IsKonradEnabled => !string.IsNullOrEmpty(CurrentFilter) && CurrentFilter != FilterHelper.FILTERKONRAD;
|
||||
public bool IsKonradEnabled => !string.IsNullOrEmpty(CurrentFilter) && CurrentFilter.GetBikeCategory() != FilterHelper.FILTERKONRAD;
|
||||
|
||||
/// <summary> Gets color of the Konrad button. </summary>
|
||||
public Color KonradColor => CurrentFilter == FilterHelper.FILTERKONRAD ? Color.Red : Color.Gray;
|
||||
public Color KonradColor => CurrentFilter.GetBikeCategory() == FilterHelper.FILTERKONRAD ? Color.Red : Color.Gray;
|
||||
|
||||
/// <summary> Gets whether toggle functionality is visible or not. </summary>
|
||||
public bool IsToggleVisible =>
|
||||
FilterDictionary.ContainsKey(FilterHelper.FILTERKONRAD)
|
||||
&& FilterDictionary.ContainsKey(FilterHelper.FILTERTINKGENERAL)
|
||||
FilterDictionary.Select(x => x.Key).ContainsGroupId(FilterHelper.FILTERKONRAD)
|
||||
&& FilterDictionary.Select(x => x.Key).ContainsGroupId(FilterHelper.FILTERTINKGENERAL)
|
||||
&& (IsTinkEnabled || IsKonradEnabled);
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -41,24 +41,8 @@ namespace TINK.Model.Connector
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the active uri.
|
||||
/// </summary>
|
||||
private Uri ActiveUri
|
||||
{
|
||||
set
|
||||
{
|
||||
if (m_oUris.ActiveUri.AbsoluteUri == value.AbsoluteUri)
|
||||
{
|
||||
/// Nothing to do.
|
||||
return;
|
||||
}
|
||||
|
||||
m_oUris = new CopriServerUriList(m_oUris.Uris.ToArray(), value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets the known uris. </summary>
|
||||
/// <summary> Gets the known uris text, i.e. binds to picker ItemsSource. </summary>
|
||||
public IList<string> ServerTextList
|
||||
{
|
||||
get
|
||||
|
@ -70,7 +54,7 @@ namespace TINK.Model.Connector
|
|||
/// <summary> Holds the uri which will be applied after restart of app. </summary>
|
||||
public Uri NextActiveUri { get; private set; }
|
||||
|
||||
/// <summary> Holds the uri which will be applied after restart. </summary>
|
||||
/// <summary> Holds the active uri, i.e. binds to picker SelectedItem. </summary>
|
||||
public string NextActiveServerText
|
||||
{
|
||||
get
|
||||
|
@ -86,7 +70,7 @@ namespace TINK.Model.Connector
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary> Holds the description of the picker.</summary>
|
||||
/// <summary> Holds the description of the picker, i.e. binds to label Text.</summary>
|
||||
public string CorpiServerUriDescription
|
||||
{
|
||||
get
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue