mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 05:47:28 +02:00
Code updated to 3.0.238
This commit is contained in:
parent
3302d80678
commit
9c6a1fa92b
257 changed files with 7763 additions and 2861 deletions
|
@ -12,7 +12,7 @@ namespace TINK.ViewModel
|
|||
/// <returns>Display text</returns>
|
||||
public string GetReservedInfo(
|
||||
TimeSpan? remainingTime,
|
||||
int? stationId = null,
|
||||
string stationId = null,
|
||||
string code = null)
|
||||
{
|
||||
if (remainingTime == null)
|
||||
|
@ -38,20 +38,20 @@ namespace TINK.ViewModel
|
|||
return string.Format(AppResources.StatusTextReservationExpiredCodeLocationMaxReservationTime, code, stationId, StateRequestedInfo.MaximumReserveTime.Minutes);
|
||||
}
|
||||
|
||||
if (stationId.HasValue)
|
||||
if (!string.IsNullOrEmpty(stationId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(code))
|
||||
{
|
||||
return string.Format(
|
||||
AppResources.StatusTextReservationExpiredCodeLocationReservationTime,
|
||||
code,
|
||||
ViewModelHelper.GetStationName(stationId.Value),
|
||||
ViewModelHelper.GetStationName(stationId),
|
||||
remainingTime.Value.Minutes);
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
AppResources.StatusTextReservationExpiredLocationReservationTime,
|
||||
ViewModelHelper.GetStationName(stationId.Value),
|
||||
ViewModelHelper.GetStationName(stationId),
|
||||
remainingTime.Value.Minutes);
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ namespace TINK.ViewModel
|
|||
/// <returns>Display text</returns>
|
||||
public string GetBookedInfo(
|
||||
DateTime? from,
|
||||
int? stationId = null,
|
||||
string stationId = null,
|
||||
string code = null)
|
||||
{
|
||||
if (from == null)
|
||||
|
@ -77,12 +77,12 @@ namespace TINK.ViewModel
|
|||
|
||||
if (!string.IsNullOrEmpty(code))
|
||||
{
|
||||
if(stationId.HasValue)
|
||||
if(!string.IsNullOrEmpty(stationId))
|
||||
{
|
||||
return string.Format(
|
||||
AppResources.StatusTextBookedCodeLocationSince,
|
||||
code,
|
||||
ViewModelHelper.GetStationName(stationId.Value),
|
||||
ViewModelHelper.GetStationName(stationId),
|
||||
from.Value.ToString(BikeViewModelBase.TIMEFORMAT));
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ using Plugin.Permissions;
|
|||
using Plugin.Permissions.Abstractions;
|
||||
using Plugin.BLE.Abstractions.Contracts;
|
||||
using TINK.MultilingualResources;
|
||||
using TINK.Model.Device;
|
||||
|
||||
namespace TINK.ViewModel.MyBikes
|
||||
{
|
||||
|
@ -31,6 +32,7 @@ namespace TINK.ViewModel.MyBikes
|
|||
/// Constructs bike collection view model in case information about occupied bikes is available.
|
||||
/// </summary>
|
||||
/// <param name="p_oUser">Mail address of active user.</param>
|
||||
/// <param name="isReportLevelVerbose">True if report level is verbose, false if not.</param>
|
||||
/// <param name="permissions">Holds object to query location permisions.</param>
|
||||
/// <param name="bluetoothLE">Holds object to query bluetooth state.</param>
|
||||
/// <param name="runtimPlatform">Specifies on which platform code is run.</param>
|
||||
|
@ -39,6 +41,7 @@ namespace TINK.ViewModel.MyBikes
|
|||
/// <param name="lockService">Service to control lock retrieve info.</param>
|
||||
/// <param name="p_oPolling"> Holds whether to poll or not and the periode leght is polling is on. </param>
|
||||
/// <param name="postAction">Executes actions on GUI thread.</param>
|
||||
/// <param name="smartDevice">Provides info about the smart device (phone, tablet, ...).</param>
|
||||
/// <param name="viewService">Interface to actuate methodes on GUI.</param>
|
||||
public MyBikesPageViewModel(
|
||||
User p_oUser,
|
||||
|
@ -51,7 +54,8 @@ namespace TINK.ViewModel.MyBikes
|
|||
ILocksService lockService,
|
||||
PollingParameters p_oPolling,
|
||||
Action<SendOrPostCallback, object> postAction,
|
||||
IViewService viewService) : base(p_oUser, permissions, bluetoothLE, runtimPlatform, isConnectedDelegate, connectorFactory, geolocation, lockService, p_oPolling, postAction, viewService, () => new MyBikeInUseStateInfoProvider())
|
||||
ISmartDevice smartDevice,
|
||||
IViewService viewService) : base(p_oUser, permissions, bluetoothLE, runtimPlatform, isConnectedDelegate, connectorFactory, geolocation, lockService, p_oPolling, postAction, smartDevice, viewService, () => new MyBikeInUseStateInfoProvider())
|
||||
{
|
||||
CollectionChanged += (sender, eventargs) =>
|
||||
{
|
||||
|
@ -115,10 +119,10 @@ namespace TINK.ViewModel.MyBikes
|
|||
&& RuntimePlatform == Device.Android)
|
||||
{
|
||||
// Check location permission
|
||||
var status = await Permissions.CheckPermissionStatusAsync<LocationPermission>();
|
||||
var status = await PermissionsService.CheckPermissionStatusAsync<LocationPermission>();
|
||||
if (status != PermissionStatus.Granted)
|
||||
{
|
||||
var permissionResult = await Permissions.RequestPermissionAsync<LocationPermission>();
|
||||
var permissionResult = await PermissionsService.RequestPermissionAsync<LocationPermission>();
|
||||
|
||||
if (permissionResult != PermissionStatus.Granted)
|
||||
{
|
||||
|
@ -141,7 +145,7 @@ namespace TINK.ViewModel.MyBikes
|
|||
}
|
||||
|
||||
// Open permissions dialog.
|
||||
Permissions.OpenAppSettings();
|
||||
PermissionsService.OpenAppSettings();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +167,7 @@ namespace TINK.ViewModel.MyBikes
|
|||
}
|
||||
|
||||
// Bluetooth state
|
||||
if (await BluetoothLE.GetBluetoothState() != BluetoothState.On)
|
||||
if (await BluetoothService.GetBluetoothState() != BluetoothState.On)
|
||||
{
|
||||
await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
|
@ -230,7 +234,7 @@ namespace TINK.ViewModel.MyBikes
|
|||
PostAction(
|
||||
unused =>
|
||||
{
|
||||
ActionText = "Aktualisiere...";
|
||||
ActionText = AppResources.ActivityTextUpdating;
|
||||
IsConnected = IsConnectedDelegate();
|
||||
},
|
||||
null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue