private void control_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         this.cmb_Server.ItemsSource = dC_Service.GetDCServers();
         this.cmb_Crane.ItemsSource  = dC_Service.GetCranes().DefaultView;
     }
     catch (Exception)
     {
     }
 }
 private void Load()
 {
     try
     {
         List <DC_SERVER> servers = dC_Service.GetDCServers().OrderBy(s => s.NAME).ToList();
         foreach (var server in servers)
         {
             server.Devices = new ObservableCollection <DC_DEVICE>(dC_Service.GetDCDevices(server).OrderBy(s => s.NAME).ToList());
             foreach (var device in server.Devices)
             {
                 device.Configs = new ObservableCollection <DC_DATA_CONFIG>(dC_Service.GetDCDataConfigs(device).OrderBy(s => s.NAME).ToList());
             }
         }
         Servers = new ObservableCollection <DC_SERVER>(servers);
         OnPropertyChanged("Servers");
     }
     catch (Exception ex)
     {
         MessageBox.Show("加载异常。" + ex.Message, "提示", MessageBoxButton.OK, MessageBoxImage.Information);
     }
 }