Squashed 'FSI.Lib/' content from commit dceb500

git-subtree-dir: FSI.Lib
git-subtree-split: dceb5008a2176c2b8ab5e55a73b1c25d31a7f841
This commit is contained in:
maier_S
2022-03-14 11:02:41 +01:00
commit 1a74bce2ad
51 changed files with 6124 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace FSI.Lib.MVVM.ViewModel
{
public class CurrentTimeViewModel : INotifyPropertyChanged
{
private string _currentTime;
public CurrentTimeViewModel()
{
UpdateTime();
}
private async void UpdateTime()
{
CurrentTime = DateTime.Now.ToString("G");
await Task.Delay(1000);
UpdateTime();
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public string CurrentTime
{
get { return _currentTime; }
set { _currentTime = value; OnPropertyChanged(); }
}
}
}