ProcessHistoryView.xaml.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. using Venus_MainPages.ViewModels;
  16. using static Venus_MainPages.ViewModels.ProcessHistoryViewModel;
  17. namespace Venus_MainPages.Views
  18. {
  19. /// <summary>
  20. /// ProcessHistoryView.xaml 的交互逻辑
  21. /// </summary>
  22. public partial class ProcessHistoryView : UserControl
  23. {
  24. public ProcessHistoryView()
  25. {
  26. InitializeComponent();
  27. }
  28. private ProcessHistoryViewModel _viewModel;
  29. private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
  30. {
  31. RecipeItem item = (dataGrid_RecipeList.SelectedItem) as RecipeItem;
  32. _viewModel = (ProcessHistoryViewModel)DataContext;
  33. _viewModel.UpdateData(item);
  34. ButtonExportData.IsEnabled = item != null;
  35. ButtonExportList.IsEnabled = item != null;
  36. }
  37. }
  38. }