mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-23 23:56:26 +01:00
36 lines
No EOL
1 KiB
C#
36 lines
No EOL
1 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
|
|
namespace TINK.ViewModel.Settings
|
|
{
|
|
/// <summary> Manages locks services and related parameters. </summary>
|
|
public class LocksServicesViewModel : INotifyPropertyChanged
|
|
{
|
|
private TimeSpan ConnectTimeout { get; set; }
|
|
|
|
public LocksServicesViewModel(
|
|
TimeSpan connectTimeout,
|
|
ServicesViewModel servicesViewModel)
|
|
{
|
|
ConnectTimeout = connectTimeout;
|
|
Services = servicesViewModel;
|
|
}
|
|
|
|
public ServicesViewModel Services { get; }
|
|
|
|
public string ConnectTimeoutSecText { get => ConnectTimeout.TotalSeconds.ToString(); }
|
|
|
|
public double ConnectTimeoutSec
|
|
{
|
|
get => ConnectTimeout.TotalSeconds;
|
|
|
|
set
|
|
{
|
|
ConnectTimeout = TimeSpan.FromSeconds(value);
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(ConnectTimeoutSecText)));
|
|
}
|
|
}
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
}
|
|
} |