47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
namespace OMNIPruefung.ViewModels.Content
|
|
{
|
|
using OMNIPruefung.ViewModels.Base;
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
public class MainContentVM : ContentVM
|
|
{
|
|
public MainContentVM() : base()
|
|
{
|
|
this.Content = this;
|
|
this.Header = "OMNI+ Prüfung";
|
|
this.ContentSelected += this.SetContentSelected;
|
|
this.Options = new ObservableCollection<OptionVM>();
|
|
|
|
var exchangeHubVM = new ExchangeHubContentVM();
|
|
exchangeHubVM.ContentSelected += this.SetContentSelected;
|
|
|
|
var contentEOL = new EOLContentVM();
|
|
contentEOL.ContentSelected += this.SetContentSelected;
|
|
|
|
this.Nodes.Add(exchangeHubVM);
|
|
this.Nodes.Add(contentEOL);
|
|
|
|
this.Options.Add(exchangeHubVM.Option);
|
|
this.Options.Add(contentEOL.Option);
|
|
}
|
|
|
|
private ContentVM content;
|
|
public ContentVM Content
|
|
{
|
|
get => this.content;
|
|
set
|
|
{
|
|
this.content = value;
|
|
|
|
this.NotifyPropertyChanged(nameof(this.Content));
|
|
}
|
|
}
|
|
|
|
public ObservableCollection<OptionVM> Options { get; }
|
|
|
|
private void SetContentSelected(ContentVM content)
|
|
=> this.Content = content;
|
|
}
|
|
}
|