31 lines
971 B
C#
31 lines
971 B
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Collections.ObjectModel;
|
|||
|
|
using System.Windows.Controls;
|
|||
|
|
|
|||
|
|
namespace DatabaseExport
|
|||
|
|
{
|
|||
|
|
public class TabPageItem : TabPageCommon
|
|||
|
|
{
|
|||
|
|
public UserControl Content { get; set; } = null;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class TabPageItemGroup : TabPageCommon
|
|||
|
|
{
|
|||
|
|
public ObservableCollection<TabPageItem> Items { get; } = new ObservableCollection<TabPageItem>();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class TabPageSource
|
|||
|
|
{
|
|||
|
|
private static TabPageSource _source = new TabPageSource();
|
|||
|
|
|
|||
|
|
public ObservableCollection<TabPageItemGroup> AllGroups { get; } = new ObservableCollection<TabPageItemGroup>();
|
|||
|
|
|
|||
|
|
public static IEnumerable<TabPageItemGroup> GetGroups(string uniqueid)
|
|||
|
|
{
|
|||
|
|
if (!uniqueid.Equals("AllGroups")) throw new ArgumentException("Only 'AllGroups' is supported as a collection of groups");
|
|||
|
|
return _source.AllGroups;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|