2021-05-13 20:03:07 +02:00
|
|
|
|
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(); }
|
|
|
|
|
|
2022-08-30 15:42:25 +02:00
|
|
|
|
public double ConnectTimeoutSec
|
|
|
|
|
{
|
2021-05-13 20:03:07 +02:00
|
|
|
|
get => ConnectTimeout.TotalSeconds;
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
ConnectTimeout = TimeSpan.FromSeconds(value);
|
|
|
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(ConnectTimeoutSecText)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
|
}
|
|
|
|
|
}
|