AgentPage.xaml.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using ExamTry.NewWindowsForAgent;
  2. using ExamTry.Patterns;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. namespace ExamTry.Pages
  18. {
  19. /// <summary>
  20. /// Логика взаимодействия для AgentPage.xaml
  21. /// </summary>
  22. public partial class AgentPage : Page
  23. {
  24. ViewModel viewModel = new ViewModel();
  25. public AgentPage()
  26. {
  27. InitializeComponent();
  28. DataContext = viewModel;
  29. // prioritetyBtn.Visibility = Visibility.Collapsed;
  30. }
  31. private void AgentList_SelectionChanged(object sender, SelectionChangedEventArgs e)
  32. {
  33. if (AgentList.SelectedItems.Count > 1)
  34. {
  35. prioritetyBtn.Visibility = Visibility.Visible;
  36. }
  37. else
  38. {
  39. prioritetyBtn.Visibility = Visibility.Collapsed;
  40. }
  41. }
  42. private void ChagePrior(object sender, RoutedEventArgs e)
  43. {
  44. ChangePriopitety chagePrioret = new ChangePriopitety();
  45. chagePrioret.ShowDialog();
  46. }
  47. private void EditAgent(object sender, MouseButtonEventArgs e)
  48. {
  49. AgentEdit eA = new AgentEdit(viewModel);
  50. eA.ShowDialog();
  51. }
  52. private void OpenWindowAddAgent(object sender, RoutedEventArgs e)
  53. {
  54. AddNewAgent eA = new AddNewAgent(viewModel);
  55. eA.ShowDialog();
  56. }
  57. }
  58. }