mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-19 03:27:29 +02:00
Version 3.0.357
This commit is contained in:
parent
5980410182
commit
5c0b2e70c9
84 changed files with 1012 additions and 449 deletions
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -107,6 +107,12 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock
|
|||
selectedBike.State.Value,
|
||||
viewService,
|
||||
bikesViewModel);
|
||||
|
||||
selectedBike.PropertyChanged += (sender, ev) =>
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsButtonVisible)));
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsLockitButtonVisible)));
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -131,13 +137,17 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock
|
|||
}
|
||||
|
||||
/// <summary> Gets visiblity of the copri command button. </summary>
|
||||
public bool IsButtonVisible => RequestHandler.IsButtonVisible;
|
||||
public bool IsButtonVisible
|
||||
=> RequestHandler.IsButtonVisible
|
||||
&& Bike.DataSource == Model.Bikes.BikeInfoNS.BC.DataSource.Copri /* do not show button if data is from cache */ ;
|
||||
|
||||
/// <summary> Gets the text of the copri command button. </summary>
|
||||
public string ButtonText => RequestHandler.ButtonText;
|
||||
|
||||
/// <summary> Gets visiblity of the ILockIt command button. </summary>
|
||||
public bool IsLockitButtonVisible => RequestHandler.IsLockitButtonVisible;
|
||||
public bool IsLockitButtonVisible
|
||||
=> RequestHandler.IsLockitButtonVisible
|
||||
&& Bike.DataSource == Model.Bikes.BikeInfoNS.BC.DataSource.Copri /* do not show button if data is from cache */ ;
|
||||
|
||||
/// <summary> Gets the text of the ILockIt command button. </summary>
|
||||
public string LockitButtonText => RequestHandler.LockitButtonText;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue