sharee.bike-App/TINKLib/ViewModel/Settings/LocksServicesViewModel.cs
Anja Müller-Meißner 0468955d49 Version 3.0.338
2022-09-08 09:55:14 +02:00

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