using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows;
using System.Windows.Media;
using BS.Shared.DataContracts;
using BeWo.Core.Service;

namespace BeWo.View.Search
{
    public class AdditionalServiceGroupOfPeopleSearchView : GenericSearchView<AdditionalServiceGroupOfPeopleDC>
    {
        public event EventHandler ControlInitialized;

        public AdditionalServiceGroupOfPeopleSearchView()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;

            ThemeColor = FindResource("SupportConceptContentBrush") as Brush;
            ListItemStyle = FindResource("SupportConceptSearchStyle") as Style;
        }

        public List<AdditionalServiceGroupOfPeopleDC> AdditionalServiceGroupsOfPeople
        {
            get { return _ObjectList; }
            set { base.UpdateObjectList(value); }
        }

        protected override void UpdateObjectList(List<AdditionalServiceGroupOfPeopleDC> list)
        {
            base.UpdateObjectList(list);
            if (ControlInitialized != null)
                ControlInitialized(this, new EventArgs());

        }

        protected override void GetAll(Action<List<AdditionalServiceGroupOfPeopleDC>> pCallBack)
        {
            Cache.GetInstance().GetAllAdditionalServiceGroupOfPeople(pCallBack);
        }

        protected override bool ShowDCInList(object dc)
        {
            return true;
        }
    }
}
