Stock from Github repo

- WPF Client (empty)
- MVVM code base (limited)
- Images, Sprites, and other Rss
This commit is contained in:
Nate VanBuskirk
2020-01-09 17:10:28 -06:00
parent 959ece4d7c
commit eaac71df55
102 changed files with 519 additions and 0 deletions
@@ -0,0 +1,34 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace SeriusSoft.Frameworks.MVVM.ViewModels
{
public abstract class BaseViewModel : INotifyPropertyChanged, IBackedByModel
{
public virtual bool IsNew { get { return true; } }
public virtual bool IsBacked { get; set; }
///<summary>
/// if you are having trouble with the [CallerMemberName] attribute due to versioning,
/// you can check out http://stackoverflow.com/questions/301809/workarounds-for-nameof-operator-in-c-typesafe-databinding for supplying a name to this method
/// as well as the inner workings of new'ing up an Exception to determine how they use the call-stack to find out who called the method or which method call it is on or just finished
///<summary>
protected virtual void RaisePropertyChanged([CallerMemberName] string member = "")
{
var copy = PropertyChanged;
if ( copy != null )
{
var changedEvent = new PropertyChangedEventArgs(member);
copy(this, changedEvent);
}
}
protected abstract void RaiseAllBackedPropertiesChanged();
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
#endregion
}
}