using System.Collections.ObjectModel;

namespace Silverlight_Binding_TreeView
{
	public class OrganizationsDataSource : ObservableCollection<Organization>
	{
		public OrganizationsDataSource()
		{
			bool isChecked = true;
			bool isSelected = true;
			bool isExpanded = true;

			Organization microsoft = new Organization("Microsoft", !isSelected, isExpanded, !isChecked);
			Department slDepartment = new Department("Silverlight", !isSelected, isExpanded, isChecked);
			slDepartment.Employees.Add(new Employee("Scott Guthrie", isSelected, !isExpanded, isChecked));
			slDepartment.Employees.Add(new Employee("Scott Barnes", !isSelected, !isExpanded, isChecked));
			slDepartment.Employees.Add(new Employee("Brad Becker", !isSelected, !isExpanded, isChecked));
			microsoft.Departments.Add(slDepartment);
			Department wpfDepartment = new Department("WPF", !isSelected, isExpanded, !isChecked);
			wpfDepartment.Employees.Add(new Employee("Karin Meier", !isSelected, !isExpanded, !isChecked));
			wpfDepartment.Employees.Add(new Employee("Jim Galasyn", !isSelected, !isExpanded, !isChecked));
			microsoft.Departments.Add(wpfDepartment);

			Organization foo = new Organization("Foo Organization", !isSelected, isExpanded, !isChecked);
			Department fooDepartment = new Department("Foo Department 1", !isSelected, isExpanded, isChecked);
			fooDepartment.Employees.Add(new Employee("Foo Employee 1", !isSelected, !isExpanded, !isChecked));
			fooDepartment.Employees.Add(new Employee("Foo Employee 2", !isSelected, !isExpanded, !isChecked));
			foo.Departments.Add(fooDepartment);

			this.Add(microsoft);
			this.Add(foo);
		}
	}
}
