using CollaborativePlatformMain.DFEntity.MessageSubUtil;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace CollaborativePlatformMain.Form.MessageSubPage
{
    /// <summary>
    /// SeconContactsPage.xaml 的交互逻辑
    /// </summary>
    public partial class SeconContactsPage : Page
    {
        /// <summary>
        /// 父级窗体
        /// </summary>
        public HomepageForm Homepage;

        public SeconContactsPage(HomepageForm homepage)
        {
            InitializeComponent();
            Homepage = homepage;
        }

        /// <summary>
        /// 窗体初始化
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            List<ContactsUtil> contactsUtils = new List<ContactsUtil>();

            //建筑
            ContactsUtil archSubData1 = new ContactsUtil("1", "建筑-伙计1");
            ContactsUtil archSubData2 = new ContactsUtil("2", "建筑-伙计2");
            ContactsUtil archSubData3 = new ContactsUtil("3", "建筑-伙计3");
            ContactsUtil archSubData4 = new ContactsUtil("4", "建筑-伙计4");
            ContactsUtil archSubData5 = new ContactsUtil("5", "建筑-伙计5");
            ContactsUtil archData = new ContactsUtil("1", "建筑组", new List<ContactsUtil>() { archSubData1, archSubData2, archSubData3, archSubData4, archSubData5 });
            contactsUtils.Add(archData) ;

            //结构
            ContactsUtil struSubData1 = new ContactsUtil("1", "结构-伙计1");
            ContactsUtil struSubData2 = new ContactsUtil("2", "结构-伙计2");
            ContactsUtil struSubData3 = new ContactsUtil("3", "结构-伙计3");
            ContactsUtil struSubData4 = new ContactsUtil("4", "结构-伙计4");
            ContactsUtil struSubData5 = new ContactsUtil("5", "结构-伙计5");
            ContactsUtil struData = new ContactsUtil("1", "结构组", new List<ContactsUtil>() { struSubData1, struSubData2, struSubData3, struSubData4, struSubData5 });
            contactsUtils.Add(struData);


            //给排水
            ContactsUtil waterSubData1 = new ContactsUtil("1", "给排水-伙计1");
            ContactsUtil waterSubData2 = new ContactsUtil("2", "给排水-伙计2");
            ContactsUtil waterSubData3 = new ContactsUtil("3", "给排水-伙计3");
            ContactsUtil waterSubData4 = new ContactsUtil("4", "给排水-伙计4");
            ContactsUtil waterSubData5 = new ContactsUtil("5", "给排水-伙计5");
            ContactsUtil waterData = new ContactsUtil("1", "给排水组", new List<ContactsUtil>() { waterSubData1, waterSubData2, waterSubData3, waterSubData4, waterSubData5 });
            contactsUtils.Add(waterData);


            //暖通
            ContactsUtil warmSubData1 = new ContactsUtil("1", "暖通-伙计1");
            ContactsUtil warmSubData2 = new ContactsUtil("2", "暖通-伙计2");
            ContactsUtil warmSubData3 = new ContactsUtil("3", "暖通-伙计3");
            ContactsUtil warmSubData4 = new ContactsUtil("4", "暖通-伙计4");
            ContactsUtil warmSubData5 = new ContactsUtil("5", "暖通-伙计5");
            ContactsUtil warmData = new ContactsUtil("1", "暖通组", new List<ContactsUtil>() { warmSubData1, warmSubData2, warmSubData3, warmSubData4, warmSubData5 });
            contactsUtils.Add(warmData);


            //电气
            ContactsUtil eleSubData1 = new ContactsUtil("1", "电气-伙计1");
            ContactsUtil eleSubData2 = new ContactsUtil("2", "电气-伙计2");
            ContactsUtil eleSubData3 = new ContactsUtil("3", "电气-伙计3");
            ContactsUtil eleSubData4 = new ContactsUtil("4", "电气-伙计4");
            ContactsUtil eleSubData5 = new ContactsUtil("5", "电气-伙计5");
            ContactsUtil eleData = new ContactsUtil("1", "电气组", new List<ContactsUtil>() { eleSubData1, eleSubData2, eleSubData3, eleSubData4, eleSubData5 });
            contactsUtils.Add(eleData);

            tr_Contacts.ItemsSource = null;
            tr_Contacts.ItemsSource = contactsUtils;
        }

        private void tv_projectLeftButtonUp(object sender, MouseButtonEventArgs e)
        {

        }
    }
}
