Added INotifyPropertyChanged interface and target kind to reference.

This commit is contained in:
2014-09-12 18:22:24 +03:00
parent f0071e552f
commit 0090059531
7 changed files with 204 additions and 51 deletions

View File

@ -35,17 +35,6 @@ namespace RainmeterStudio.UI.ViewModel
}
}
/// <summary>
/// Gets or sets the path
/// </summary>
public string Path
{
get
{
return Reference.StoragePath;
}
}
/// <summary>
/// Gets an enumerable of this object's children
/// </summary>
@ -120,9 +109,16 @@ namespace RainmeterStudio.UI.ViewModel
{
Reference = reference;
Reference.CollectionChanged += Reference_CollectionChanged;
Reference.PropertyChanged += Reference_PropertyChanged;
RefreshChildren();
}
private void Reference_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "Name" && PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs("Name"));
}
private void Reference_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
List<ReferenceViewModel> newItems = new List<ReferenceViewModel>();