/// <summary>
 /// 删除项
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void click_Del_Config(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show("确认删除吗", "提示", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
     {
         DC_DATA_CONFIG config = (DC_DATA_CONFIG)(sender as FrameworkElement).Tag;
         try
         {
             dC_Service.DeleteDataConfig(config);
             dC_Service.DeleteRealData(config.ID);
             MessageBox.Show("删除成功。");
             DC_SERVER server = Servers.First(s => s.Devices.FirstOrDefault(p => p.ID == config.DEVICE_ID) != null);
             DC_DEVICE device = server.Devices.First(s => s.ID == config.DEVICE_ID);
             device.Configs.Remove(config);
         }
         catch (Exception ex)
         {
             MessageBox.Show("删除异常。" + ex.Message);
         }
     }
 }