Daten werden nun geladen

This commit is contained in:
HuskyTeufel
2021-05-05 13:32:46 +02:00
parent af01e537cf
commit 5d89391e93
20 changed files with 236 additions and 170 deletions

View File

@@ -1,37 +1,25 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GuiWPF
namespace WPF
{
public class ViewModelBase : NotificationObject
public abstract class ViewModelBase : INotifyPropertyChanged
{
private bool valIsBusy;
private string valBusyMessage;
public bool IsBusy
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string propertyName)
{
get => valIsBusy;
set
{
if(valIsBusy != value)
{
valIsBusy = value;
OnPropertyChanged();
}
}
this.OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
}
public string BusyMessage
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
{
get => valBusyMessage;
set
{
if(valBusyMessage != value)
{
valBusyMessage = value;
OnPropertyChanged();
}
}
var handler = this.PropertyChanged;
if (handler != null)
handler(this, e);
}
}
}