Esempio n. 1
0
 private void TypeComo_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (HistoryTypeComo.SelectedIndex == 0)
     {
         PackComo.Visibility       = Visibility.Collapsed;
         hvm.DataHistory           = ViewModel.dataCurrentMaster.Clone();
         HistotyGrid.ColumnsSource = hvm.MasterDataColumn;
         //TypeComobox设定绑定源要放在最后定义
         TypeComobox.ItemsSource = ViewModel.MasterListComobox;
         HistotyGrid.ItemsSource = hvm.DataHistory;
         CreateChart(null);
     }
     else
     {
         hvm.SendReadPackStatus();
         if (!hvm.OffConnect)
         {
             PackComo.Visibility = Visibility.Visible;
         }
         HistotyGrid.ColumnsSource = hvm.PackListColumn;
         //TypeComobox设定绑定源要放在最后定义
         TypeComobox.ItemsSource = hvm.PackDataTypeComobox;
     }
 }