mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-21 21:46:27 +02:00
Version 3.0.290
This commit is contained in:
parent
af3c20ea1c
commit
ad3cdbcadf
231 changed files with 14555 additions and 7798 deletions
|
@ -5,6 +5,7 @@
|
|||
<MultilingualFallbackLanguage>en-GB</MultilingualFallbackLanguage>
|
||||
<TranslationReport Condition="'$(Configuration)' == 'Release'">true</TranslationReport>
|
||||
<SuppressPseudoWarning Condition="'$(Configuration)' == 'Debug'">true</SuppressPseudoWarning>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
|
|
|
@ -8,10 +8,15 @@ namespace TINK.Model.Bike.BluetoothLock
|
|||
/// <summary> Locking states. </summary>
|
||||
public enum LockingState
|
||||
{
|
||||
Disconnected,
|
||||
/// <summary> App is not connected to lock.</summary>
|
||||
UnknownDisconnected,
|
||||
|
||||
/// <summary> Lock might be open, closed or something in between..</summary>
|
||||
Unknown,
|
||||
/// <summary> Lock might be open, closed or something in between.</summary>
|
||||
/// <remarks>
|
||||
/// Under certain circumstances lock reports/ is known to be in this state (genuine ILOCKIT locking state LockitLockingState.Unknown).
|
||||
/// Example: If bold is blocked it might happen that opening or closing lock leads to state unknown, i.e. might be open, closed or inbetween.
|
||||
/// </remarks>
|
||||
UnknownFromHardwareError,
|
||||
|
||||
/// <summary> Lock is closed. </summary>
|
||||
Closed,
|
||||
|
@ -42,7 +47,7 @@ namespace TINK.Model.Bike.BluetoothLock
|
|||
|
||||
/// <summary> Locking state of bluetooth lock. </summary>
|
||||
[DataMember]
|
||||
public LockingState State { get; private set; } = LockingState.Disconnected;
|
||||
public LockingState State { get; private set; } = LockingState.UnknownDisconnected;
|
||||
|
||||
public bool IsIdValid => Id != TextToLockItTypeHelper.INVALIDLOCKID;
|
||||
|
||||
|
|
|
@ -35,8 +35,25 @@
|
|||
<target state="translated">Schloss ist blockiert.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ErrorOpenLockBoldWasBlocked" translate="yes" xml:space="preserve">
|
||||
<source>Bolds was or is blocked.</source>
|
||||
<target state="new">Bolds was or is blocked.</target>
|
||||
<source>Bold was or is blocked.</source>
|
||||
<target state="needs-review-translation">Schloss war oder ist blockiert.</target>
|
||||
<note from="MultilingualUpdate" annotates="source" priority="2">Please verify the translation’s accuracy as the source string was updated after it was translated.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="ErrorConnectLockBluetoothNotOnException" translate="yes" xml:space="preserve">
|
||||
<source>Can not connect to lock. Unexpected bluetooth state {0} detected.</source>
|
||||
<target state="translated">Kann keine Verbindung zum Schloss herstellen. Unerwarteter Bluetooth-Status {0} erkannt.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ErrorConnectLockBluetoothOffException" translate="yes" xml:space="preserve">
|
||||
<source>Can not connect to lock. Bluetooth is off but has to be turned on.</source>
|
||||
<target state="translated">Kann keine Verbindung zum Schloss herstellen. Bluetooth ist aus und sollte aber angeschalten sein.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ErrorConnectLockLocationOffException" translate="yes" xml:space="preserve">
|
||||
<source>Can not connect to lock. Location is off but has to be turned on.</source>
|
||||
<target state="translated">Kann keine Verbindung zum Schloss herstellen. Standortbestimmung ist deaktiviert, sollte aber aktiviert sein.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ErrorConnectLockLocationPermissingMissingException" translate="yes" xml:space="preserve">
|
||||
<source>Can not connect to lock. Location permission is required but not granted. </source>
|
||||
<target state="translated">Kann keine Verbindung zum Schloss herstellen. Standort-Zugriffserlaubnis muss erteilt sein wurde aber nicht erteilt. </target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -105,6 +105,42 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Can not connect to lock. Unexpected bluetooth state {0} detected..
|
||||
/// </summary>
|
||||
internal static string ErrorConnectLockBluetoothNotOnException {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorConnectLockBluetoothNotOnException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Can not connect to lock. Bluetooth is off but has to be turned on..
|
||||
/// </summary>
|
||||
internal static string ErrorConnectLockBluetoothOffException {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorConnectLockBluetoothOffException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Can not connect to lock. Location is off but has to be turned on..
|
||||
/// </summary>
|
||||
internal static string ErrorConnectLockLocationOffException {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorConnectLockLocationOffException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Can not connect to lock. Location permission is required but not granted. .
|
||||
/// </summary>
|
||||
internal static string ErrorConnectLockLocationPermissingMissingException {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorConnectLockLocationPermissingMissingException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bold is blocked..
|
||||
/// </summary>
|
||||
|
@ -115,7 +151,7 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bolds was or is blocked..
|
||||
/// Looks up a localized string similar to Bold was or is blocked..
|
||||
/// </summary>
|
||||
internal static string ErrorOpenLockBoldWasBlocked {
|
||||
get {
|
||||
|
|
|
@ -33,4 +33,19 @@
|
|||
<data name="ErrorOpenLockBoldBlocked" xml:space="preserve">
|
||||
<value>Schloss ist blockiert.</value>
|
||||
</data>
|
||||
<data name="ErrorOpenLockBoldWasBlocked" xml:space="preserve">
|
||||
<value>Schloss war oder ist blockiert.</value>
|
||||
</data>
|
||||
<data name="ErrorConnectLockBluetoothNotOnException" xml:space="preserve">
|
||||
<value>Kann keine Verbindung zum Schloss herstellen. Unerwarteter Bluetooth-Status {0} erkannt.</value>
|
||||
</data>
|
||||
<data name="ErrorConnectLockBluetoothOffException" xml:space="preserve">
|
||||
<value>Kann keine Verbindung zum Schloss herstellen. Bluetooth ist aus und sollte aber angeschalten sein.</value>
|
||||
</data>
|
||||
<data name="ErrorConnectLockLocationOffException" xml:space="preserve">
|
||||
<value>Kann keine Verbindung zum Schloss herstellen. Standortbestimmung ist deaktiviert, sollte aber aktiviert sein.</value>
|
||||
</data>
|
||||
<data name="ErrorConnectLockLocationPermissingMissingException" xml:space="preserve">
|
||||
<value>Kann keine Verbindung zum Schloss herstellen. Standort-Zugriffserlaubnis muss erteilt sein wurde aber nicht erteilt. </value>
|
||||
</data>
|
||||
</root>
|
|
@ -132,11 +132,23 @@
|
|||
<data name="ErrorCloseLockUnknownPosition" xml:space="preserve">
|
||||
<value>Lock reports unknown bold position.</value>
|
||||
</data>
|
||||
<data name="ErrorConnectLockBluetoothNotOnException" xml:space="preserve">
|
||||
<value>Can not connect to lock. Unexpected bluetooth state {0} detected.</value>
|
||||
</data>
|
||||
<data name="ErrorConnectLockBluetoothOffException" xml:space="preserve">
|
||||
<value>Can not connect to lock. Bluetooth is off but has to be turned on.</value>
|
||||
</data>
|
||||
<data name="ErrorConnectLockLocationOffException" xml:space="preserve">
|
||||
<value>Can not connect to lock. Location is off but has to be turned on.</value>
|
||||
</data>
|
||||
<data name="ErrorConnectLockLocationPermissingMissingException" xml:space="preserve">
|
||||
<value>Can not connect to lock. Location permission is required but not granted. </value>
|
||||
</data>
|
||||
<data name="ErrorOpenLockBoldBlocked" xml:space="preserve">
|
||||
<value>Bold is blocked.</value>
|
||||
</data>
|
||||
<data name="ErrorOpenLockBoldWasBlocked" xml:space="preserve">
|
||||
<value>Bolds was or is blocked.</value>
|
||||
<value>Bold was or is blocked.</value>
|
||||
</data>
|
||||
<data name="ErrorOpenLockUnexpectedState" xml:space="preserve">
|
||||
<value>Unexpected locking state "{0}" detected after sending open command.</value>
|
||||
|
|
|
@ -2,9 +2,16 @@
|
|||
|
||||
namespace TINK.Services.BluetoothLock.Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// If fired if app is disconnected from bluetooth.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Member to determine if app is disconnected: IDevice.State from server Plugin.BLE. If DeviceState.Disconnected exception is fired.
|
||||
/// All possible states: Disconnected, Connecting, Connected, Limited.
|
||||
/// </remarks>
|
||||
public class BluetoothDisconnectedException : StateAwareException
|
||||
{
|
||||
public BluetoothDisconnectedException() : base(LockingState.Disconnected, MultilingualResources.Resources.ErrorBluetoothDisconnectedException)
|
||||
public BluetoothDisconnectedException() : base(LockingState.UnknownDisconnected, MultilingualResources.Resources.ErrorBluetoothDisconnectedException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
using TINK.MultilingualResources;
|
||||
|
||||
namespace TINK.Services.BluetoothLock.Exception
|
||||
{
|
||||
/// <summary> Exception which is fired when bluetooth is not on. </summary>
|
||||
/// <remarks>
|
||||
/// Member to determine if app is disconnected: IBluetoothLE.State from server Plugin.BLE. If current value is not BluetoothState.On exception is fired.
|
||||
/// All possible states: Unknown, Unavailable, Unauthorized, TurningOn, On, TurningOff, Off.
|
||||
/// </remarks>
|
||||
public class ConnectBluetoothNotOnException : System.Exception
|
||||
{
|
||||
public ConnectBluetoothNotOnException() : base(Resources.ErrorConnectLockBluetoothOffException) { }
|
||||
|
||||
public ConnectBluetoothNotOnException(object state) : base(string.Format(Resources.ErrorConnectLockBluetoothNotOnException, state.ToString())) { }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
using TINK.MultilingualResources;
|
||||
|
||||
namespace TINK.Services.BluetoothLock.Exception
|
||||
{
|
||||
public class ConnectLocationOffException : System.Exception
|
||||
{
|
||||
public ConnectLocationOffException() : base(Resources.ErrorConnectLockLocationOffException) { }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
using TINK.MultilingualResources;
|
||||
|
||||
namespace TINK.Services.BluetoothLock.Exception
|
||||
{
|
||||
public class ConnectLocationPermissionMissingException : System.Exception
|
||||
{
|
||||
public ConnectLocationPermissionMissingException() : base(Resources.ErrorConnectLockLocationPermissingMissingException) { }
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ namespace TINK.Services.BluetoothLock.Exception
|
|||
public class CouldntCloseBoldBlockedException : StateAwareException
|
||||
{
|
||||
public CouldntCloseBoldBlockedException() : base(
|
||||
LockingState.Unknown, // Lock is closed in most cases, but this is not guarnteed according to haveltec.
|
||||
LockingState.UnknownFromHardwareError, // Lock is closed in most cases, but this is not guaranteed according to haveltec.
|
||||
MultilingualResources.Resources.ErrorCloseLockBoldBlocked)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace TINK.Services.BluetoothLock.Exception
|
|||
public CouldntCloseInconsistentStateExecption(LockingState state) :
|
||||
base(
|
||||
state,
|
||||
state != LockingState.Unknown
|
||||
state != LockingState.UnknownFromHardwareError
|
||||
? string.Format(Resources.ErrorCloseLockUnexpectedState, state)
|
||||
: Resources.ErrorCloseLockUnknownPosition)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace TINK.Services.BluetoothLock.Exception
|
|||
public class CouldntOpenBoldIsBlockedException : StateAwareException
|
||||
{
|
||||
public CouldntOpenBoldIsBlockedException() : base(
|
||||
LockingState.Unknown,
|
||||
LockingState.UnknownFromHardwareError,
|
||||
MultilingualResources.Resources.ErrorOpenLockBoldBlocked)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace TINK.Services.BluetoothLock.Exception
|
|||
public class CouldntOpenBoldWasBlockedException : StateAwareException
|
||||
{
|
||||
public CouldntOpenBoldWasBlockedException() : base(
|
||||
LockingState.Unknown,
|
||||
LockingState.UnknownFromHardwareError,
|
||||
MultilingualResources.Resources.ErrorOpenLockBoldWasBlocked)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace TINK.Model.Bike.BluetoothLock
|
|||
continue;
|
||||
}
|
||||
|
||||
var state = lockInfoTdo.State.HasValue ? lockInfoTdo.State.Value.GetLockingState() : LockingState.Disconnected;
|
||||
var state = lockInfoTdo.State.HasValue ? lockInfoTdo.State.Value.GetLockingState() : LockingState.UnknownDisconnected;
|
||||
|
||||
locksInfoUpdated.Add(state != lockInfo.State || lockInfoTdo.Guid != lockInfo.Guid
|
||||
? new LockInfo.Builder(lockInfo) { Guid = lockInfoTdo.Guid, State = state}.Build() // State has changed, update required.
|
||||
|
@ -43,7 +43,7 @@ namespace TINK.Model.Bike.BluetoothLock
|
|||
{
|
||||
case LockitLockingState.Unknown:
|
||||
case LockitLockingState.CouldntOpenBoldBlocked: // Lock is closed in most cases, but this is not guarnteed according to haveltec.
|
||||
return LockingState.Unknown;
|
||||
return LockingState.UnknownFromHardwareError;
|
||||
|
||||
case LockitLockingState.Open:
|
||||
case LockitLockingState.CouldntCloseMoving:
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace TINK.Services.BluetoothLock.Tdo
|
||||
{
|
||||
/// <summary> Genuine ILOCKIT state.</summary>
|
||||
public enum LockitLockingState
|
||||
{
|
||||
Open = 0x00,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue