Version 3.0.265

This commit is contained in:
Oliver Hauff 2021-12-08 20:03:50 +01:00
parent bf8e3fa73a
commit de8d5f8414
49 changed files with 959 additions and 286 deletions

View file

@ -60,8 +60,11 @@ namespace TINK.Model
/// <summary> Value indicating whether map is centerted to current position or not. </summary>
bool CenterMapToCurrentLocation { get; set; }
/// <summary> Holds the map area to display. </summary>
Xamarin.Forms.GoogleMaps.MapSpan MapSpan { get; set; }
/// <summary> Holds the map area where user is or was located or null if position is unknown. </summary>
Xamarin.Forms.GoogleMaps.MapSpan UserMapSpan { get; set; }
/// <summary> Holds the map span to display either default span or span centered to current position depending on option <see cref="CenterMapToCurrentLocation"/>.</summary>
Xamarin.Forms.GoogleMaps.MapSpan ActiveMapSpan { get; }
bool LogToExternalFolder { get; set; }

View file

@ -65,8 +65,17 @@ namespace TINK.Model
/// <summary> Value indicating whether map is centerted to current position or not. </summary>
public bool CenterMapToCurrentLocation { get; set; }
/// <summary> Holds the map area to display. </summary>
public Xamarin.Forms.GoogleMaps.MapSpan MapSpan { get; set; }
/// <summary> Holds the map area to display when starting app for first time/ when center map to is off. </summary>
private Xamarin.Forms.GoogleMaps.MapSpan HomeMapSpan { get; }
/// <summary> Holds the map area where user is or was located or null if this position is unknown. </summary>
public Xamarin.Forms.GoogleMaps.MapSpan UserMapSpan { get; set; } = null;
/// <summary> Holds the map span to display either default span or span centered to current position depending on option <see cref="CenterMapToCurrentLocation"/>.</summary>
public Xamarin.Forms.GoogleMaps.MapSpan ActiveMapSpan
=> CenterMapToCurrentLocation
? UserMapSpan ?? HomeMapSpan
: HomeMapSpan;
/// <summary> Gets the minimum logging level. </summary>
public LogEventLevel MinimumLogEventLevel { get; set; }
@ -211,7 +220,7 @@ namespace TINK.Model
CenterMapToCurrentLocation = settings.CenterMapToCurrentLocation;
MapSpan = settings.MapSpan;
HomeMapSpan = settings.MapSpan;
SmartDevice = device
?? throw new ArgumentException("Can not instantiate TinkApp- object. No device information provider available.");

View file

@ -466,6 +466,10 @@ namespace TINK.Model
{
new Version(3, 0, 264),
AppResources.ChangeLog3_0_264
},
{
new Version(3, 0, 265),
AppResources.ChangeLog3_0_265
}
};

View file

@ -889,6 +889,17 @@ namespace TINK.MultilingualResources {
}
}
/// <summary>
/// Looks up a localized string similar to Filter functionality city bike/ cargo bike improved.
///Layouting improved.
///App supports deep linking..
/// </summary>
public static string ChangeLog3_0_265 {
get {
return ResourceManager.GetString("ChangeLog3_0_265", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Lock of rented bike can not be found..
/// </summary>
@ -1239,6 +1250,24 @@ namespace TINK.MultilingualResources {
}
}
/// <summary>
/// Looks up a localized string similar to Cargo bike.
/// </summary>
public static string MarkingCargoBike {
get {
return ResourceManager.GetString("MarkingCargoBike", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to City bike.
/// </summary>
public static string MarkingCityBike {
get {
return ResourceManager.GetString("MarkingCityBike", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Please open a bike station page to to contact the bike sharing operator..
/// </summary>
@ -1593,7 +1622,7 @@ namespace TINK.MultilingualResources {
}
/// <summary>
/// Looks up a localized string similar to Tariff {0}, nr. {1}.
/// Looks up a localized string similar to Tariff {0}.
/// </summary>
public static string MessageBikesManagementTariffDescriptionTariffHeader {
get {
@ -1601,6 +1630,15 @@ namespace TINK.MultilingualResources {
}
}
/// <summary>
/// Looks up a localized string similar to Tariff {0}, nr. {1}.
/// </summary>
public static string MessageBikesManagementTariffDescriptionTariffHeaderNameId {
get {
return ResourceManager.GetString("MessageBikesManagementTariffDescriptionTariffHeaderNameId", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Please allow location sharing so that map can be centered.
///Open sharing dialog?.

View file

@ -484,7 +484,7 @@ Bitte App neu starten um Rad Infos zu bekommen.</value>
<value>Std./Tag</value>
</data>
<data name="MessageBikesManagementTariffDescriptionTariffHeader" xml:space="preserve">
<value>Tarif {0}, Nr. {1}</value>
<value>Tarif {0}</value>
</data>
<data name="ActivityTextQuerryServer" xml:space="preserve">
<value>Anfrage Server...</value>
@ -716,4 +716,18 @@ Kleine Verbesserungen.</value>
<data name="ChangeLog3_0_264" xml:space="preserve">
<value>Fehler "object reference not set ...." &lt;a href="https://dev.azure.com/TeilRad/sharee.bike%20App/_workitems/edit/186"&gt;185&lt;/a&gt; behoben.</value>
</data>
<data name="ChangeLog3_0_265" xml:space="preserve">
<value>Filterfunktion Stadtrad/ Lastenrad verbessert.
Layouting verbessert.
Deep linking wird unterstützt.</value>
</data>
<data name="MarkingCargoBike" xml:space="preserve">
<value>Lastenrad</value>
</data>
<data name="MarkingCityBike" xml:space="preserve">
<value>Stadtrad</value>
</data>
<data name="MessageBikesManagementTariffDescriptionTariffHeaderNameId" xml:space="preserve">
<value>Tarif {0}, Nr. {1}</value>
</data>
</root>

View file

@ -593,7 +593,7 @@ Please restart app in order to get bike info.</value>
<value>Max. fee</value>
</data>
<data name="MessageBikesManagementTariffDescriptionTariffHeader" xml:space="preserve">
<value>Tariff {0}, nr. {1}</value>
<value>Tariff {0}</value>
</data>
<data name="ActivityTextQuerryServer" xml:space="preserve">
<value>Request server...</value>
@ -811,4 +811,18 @@ Minor improvements.</value>
<data name="ChangeLog3_0_264" xml:space="preserve">
<value>Bug "object reference not set ...." &lt;a href="https://dev.azure.com/TeilRad/sharee.bike%20App/_workitems/edit/186"&gt;185&lt;/a&gt; fixed.</value>
</data>
<data name="ChangeLog3_0_265" xml:space="preserve">
<value>Filter functionality city bike/ cargo bike improved.
Layouting improved.
App supports deep linking.</value>
</data>
<data name="MarkingCargoBike" xml:space="preserve">
<value>Cargo bike</value>
</data>
<data name="MarkingCityBike" xml:space="preserve">
<value>City bike</value>
</data>
<data name="MessageBikesManagementTariffDescriptionTariffHeaderNameId" xml:space="preserve">
<value>Tariff {0}, nr. {1}</value>
</data>
</root>

View file

@ -645,8 +645,8 @@ Bitte App neu starten um Rad Infos zu bekommen.</target>
<target state="translated">Std./Tag</target>
</trans-unit>
<trans-unit id="MessageBikesManagementTariffDescriptionTariffHeader" translate="yes" xml:space="preserve">
<source>Tariff {0}, nr. {1}</source>
<target state="translated">Tarif {0}, Nr. {1}</target>
<source>Tariff {0}</source>
<target state="translated">Tarif {0}</target>
</trans-unit>
<trans-unit id="ActivityTextQuerryServer" translate="yes" xml:space="preserve">
<source>Request server...</source>
@ -960,6 +960,26 @@ Kleine Verbesserungen.</target>
<source>Bug "object reference not set ...." <bpt id="1">&lt;a href="https://dev.azure.com/TeilRad/sharee.bike%20App/_workitems/edit/186"&gt;</bpt>185<ept id="1">&lt;/a&gt;</ept> fixed.</source>
<target state="translated">Fehler "object reference not set ...." <bpt id="1">&lt;a href="https://dev.azure.com/TeilRad/sharee.bike%20App/_workitems/edit/186"&gt;</bpt>185<ept id="1">&lt;/a&gt;</ept> behoben.</target>
</trans-unit>
<trans-unit id="ChangeLog3_0_265" translate="yes" xml:space="preserve">
<source>Filter functionality city bike/ cargo bike improved.
Layouting improved.
App supports deep linking.</source>
<target state="translated">Filterfunktion Stadtrad/ Lastenrad verbessert.
Layouting verbessert.
Deep linking wird unterstützt.</target>
</trans-unit>
<trans-unit id="MarkingCargoBike" translate="yes" xml:space="preserve">
<source>Cargo bike</source>
<target state="translated">Lastenrad</target>
</trans-unit>
<trans-unit id="MarkingCityBike" translate="yes" xml:space="preserve">
<source>City bike</source>
<target state="translated">Stadtrad</target>
</trans-unit>
<trans-unit id="MessageBikesManagementTariffDescriptionTariffHeaderNameId" translate="yes" xml:space="preserve">
<source>Tariff {0}, nr. {1}</source>
<target state="translated">Tarif {0}, Nr. {1}</target>
</trans-unit>
</group>
</body>
</file>

View file

@ -28,11 +28,15 @@ namespace TINK.ViewModel.Bikes.Bike
return string.Empty;
#if USCSHARP9
return string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeader, Tariff?.Name ?? "-", Tariff?.Number != null ? Tariff.Number : "-");
return Tariff?.Number != null
? string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeaderNameId, Tariff?.Name ?? "-", Tariff?.Number != null ? Tariff.Number : "-");
: string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeader, Tariff?.Name ?? "-");
#else
return string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeader, Tariff?.Name ?? "-", Tariff?.Number != null ? Tariff.Number.ToString() : "-");
#endif
}
return Tariff?.Number != null
? string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeaderNameId, Tariff?.Name ?? "-", Tariff?.Number != null ? Tariff.Number.ToString() : "-")
: string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeader, Tariff?.Name ?? "-");
#endif
}
}
/// <summary>

View file

@ -433,15 +433,15 @@ namespace TINK.ViewModel.Map
if (currentLocation != null)
{
TinkApp.MapSpan = MapSpan.FromCenterAndRadius(
TinkApp.UserMapSpan = MapSpan.FromCenterAndRadius(
new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
TinkApp.MapSpan.Radius);
TinkApp.ActiveMapSpan.Radius);
TinkApp.Save();
}
}
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.MapSpan);
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.ActiveMapSpan);
m_oViewUpdateManager = CreateUpdateTask();
@ -887,16 +887,16 @@ namespace TINK.ViewModel.Map
if (currentLocation != null)
{
TinkApp.MapSpan = MapSpan.FromCenterAndRadius(
TinkApp.UserMapSpan = MapSpan.FromCenterAndRadius(
new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
TinkApp.MapSpan.Radius);
TinkApp.ActiveMapSpan.Radius);
TinkApp.Save();
}
}
// Update stations
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.MapSpan);
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.ActiveMapSpan);
IsConnected = TinkApp.GetIsConnected();
var resultStationsAndBikes = await TinkApp.GetConnector(IsConnected).Query.GetBikesAndStationsAsync();

View file

@ -9,21 +9,21 @@ namespace TINK.ViewModel.Settings
private bool m_bIsActivatedSwitch;
/// <summary> Constructs a filter object. </summary>
/// <param name="p_strKey">Key of the filter state.</param>
/// <param name="p_oFilterState">State of filter, on or off.</param>
/// <param name="p_bIsEnabled">If filter does not apply because user does not belong to group (TINK, Konrad, ...) filter is deactivated.</param>
/// <param name="p_strLabelText">Text of the switch describing the filter.</param>
/// <param name="key">Key of the filter state.</param>
/// <param name="filterState">State of filter, on or off.</param>
/// <param name="isEnabled">If filter does not apply because user does not belong to group (TINK, Konrad, ...) filter is deactivated.</param>
/// <param name="labelText">Text of the switch describing the filter.</param>
public FilterItemMutable(
string p_strKey,
FilterState p_oFilterState,
bool p_bIsEnabled,
string p_strLabelText)
string key,
FilterState filterState,
bool isEnabled,
string labelText)
{
Text = p_strLabelText;
IsEnabled = p_bIsEnabled;
State = p_oFilterState;
Key = p_strKey;
m_bIsActivatedSwitch = p_bIsEnabled && p_oFilterState == FilterState.On;
Text = labelText;
IsEnabled = isEnabled;
State = filterState;
Key = key;
m_bIsActivatedSwitch = isEnabled && filterState == FilterState.On;
}
/// <summary> Text describing the filter. </summary>

View file

@ -3,6 +3,7 @@ using System.Collections.ObjectModel;
using System.Linq;
using TINK.Model;
using TINK.Model.Connector;
using TINK.MultilingualResources;
namespace TINK.ViewModel.Settings
{
@ -11,38 +12,38 @@ namespace TINK.ViewModel.Settings
public class SettingsBikeFilterViewModel : ObservableCollection<FilterItemMutable>
{
/// <summary> Constructs a filter collection object.</summary>
/// <param name="p_oFilterSettings">All available filters.</param>
/// <param name="p_oFilterGroupUser">Filters which apply to logged in user.</param>
/// <param name="filterSettings">All available filters.</param>
/// <param name="filterGroupUser">Filters which apply to logged in user.</param>
public SettingsBikeFilterViewModel(
IGroupFilterSettings p_oFilterSettings,
IEnumerable<string> p_oFilterGroupUser)
IGroupFilterSettings filterSettings,
IEnumerable<string> filterGroupUser)
{
foreach (var l_oFilter in p_oFilterSettings)
foreach (var filter in filterSettings)
{
if (l_oFilter.Key == FilterHelper.FILTERTINKGENERAL)
if (filter.Key == FilterHelper.FILTERTINKGENERAL)
{
Add(new FilterItemMutable(
l_oFilter.Key,
l_oFilter.Value,
p_oFilterGroupUser != null ? p_oFilterGroupUser.Contains(l_oFilter.Key) : true,
"TINK Lastenräder"));
filter.Key,
filter.Value,
(filterGroupUser != null && filterGroupUser.Count() > 0) ? filterGroupUser.Contains(filter.Key) : true,
AppResources.MarkingCargoBike));
continue;
}
if (l_oFilter.Key == FilterHelper.FILTERKONRAD)
if (filter.Key == FilterHelper.FILTERKONRAD)
{
Add(new FilterItemMutable(
l_oFilter.Key,
l_oFilter.Value,
p_oFilterGroupUser != null ? p_oFilterGroupUser.Contains(l_oFilter.Key) : true,
"Konrad Stadträder"));
filter.Key,
filter.Value,
(filterGroupUser != null && filterGroupUser.Count() > 0) ? filterGroupUser.Contains(filter.Key) : true,
AppResources.MarkingCityBike));
continue;
}
Add(new FilterItemMutable(
l_oFilter.Key,
l_oFilter.Value,
p_oFilterGroupUser != null ? p_oFilterGroupUser.Contains(l_oFilter.Key) : true,
l_oFilter.Key));
filter.Key,
filter.Value,
filterGroupUser != null ? filterGroupUser.Contains(filter.Key) : true,
filter.Key));
}
}
@ -51,13 +52,13 @@ namespace TINK.ViewModel.Settings
{
get
{
var l_Dictionary = new Dictionary<string, FilterState>();
foreach (var l_oEntry in this)
var dictionary = new Dictionary<string, FilterState>();
foreach (var entry in this)
{
l_Dictionary.Add(l_oEntry.Key, l_oEntry.State);
dictionary.Add(entry.Key, entry.State);
}
return l_Dictionary;
return dictionary;
}
}
}