/// <summary>
        /// TreeView显示内容
        /// </summary>
        private void InitTrees()
        {
            tvCoor.Items.Clear();
            List <ES.Domain.Coordinator> coor = CoordinatorApp.GetList();

            foreach (ES.Domain.Coordinator gtParent in coor)
            {
                TreeViewItem tvCoorParent = new TreeViewItem()
                {
                    Header = gtParent.Name,
                    Tag    = gtParent
                };
                tvCoor.Items.Add(tvCoorParent); //设置父节点
                List <Sensor> childType = SensorApp.GetCoorList(gtParent);
                foreach (Sensor gtChild in childType)
                {
                    TreeViewItem tvCoorChild = new TreeViewItem()
                    {
                        Header = gtChild.Name,
                        Tag    = gtChild
                    };
                    tvCoorParent.Items.Add(tvCoorChild);  //设置子节点
                }
            }
        }
        public UserControlinterface()
        {
            InitializeComponent();



            cboRelay.ItemsSource   = SensorApp.GetRelayList();
            cboRelay.SelectedIndex = 0;

            cboCoor.ItemsSource   = CoordinatorApp.GetList().OrderByDescending(p => p.ID);
            cboCoor.SelectedIndex = 0;
        }
        /// <summary>
        /// 设置协调器列表
        /// </summary>
        private void SetListCoor()
        {
            lstCoor.Items.Clear();
            foreach (ES.Domain.Coordinator coor in CoordinatorApp.GetList())
            {
                Label lbl = new Label();
                lbl.Content = coor.Name;
                lbl.Tag     = coor;
                lstCoor.Items.Add(lbl);
            }
            this.lstCoor.SelectedIndex = 0;

            lblSensorCount.Content = "传感器数量:" + lvSensorList.Items.Count;
        }