sharee.bike-App/TINKLib/ViewModel/Settings/LocksServicesViewModel.cs
Anja Müller-Meißner 573fe77e12 Version 3.0.337
2022-08-30 15:42:25 +02:00

36 lines
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;
}
}