TransferSelectionDialog.xaml.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using Aitex.Core.Common;
  2. using Aitex.Core.UI.MVVM;
  3. using Aitex.Core.Util;
  4. using Aitex.Sorter.Common;
  5. using MECF.Framework.Common.Equipment;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Collections.ObjectModel;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading;
  12. using System.Threading.Tasks;
  13. using System.Windows;
  14. using System.Windows.Controls;
  15. using System.Windows.Data;
  16. using System.Windows.Documents;
  17. using System.Windows.Input;
  18. using System.Windows.Media;
  19. using System.Windows.Media.Imaging;
  20. using System.Windows.Shapes;
  21. namespace Aitex.Sorter.UI.Controls
  22. {
  23. /// <summary>
  24. /// TransferSelectionDialog.xaml 的交互逻辑
  25. /// </summary>
  26. public partial class TransferSelectionDialog : Window
  27. {
  28. public TransferSelectionViewModel TransferSelectionViewModel { get; set; }
  29. public ModuleName OriginalStation { get; set; }
  30. public ModuleName DestinationStation { get; set; }
  31. public string OriginalName { get; set; }
  32. public string DestinationName { get; set; }
  33. private WaferInfo[] originalWaferInfos;
  34. public WaferInfo[] OriginalWaferInfos { get
  35. { return originalWaferInfos; }
  36. set
  37. {
  38. originalWaferInfos = value;
  39. }
  40. }
  41. private int foupCount = 8;
  42. public int FoupCount { get
  43. {
  44. return foupCount;
  45. } set
  46. {
  47. foupCount = value;
  48. TransferSelectionViewModel.SetFoupCount(value);
  49. } }
  50. public WaferInfo[] DestinationWaferInfos { get; set; }
  51. public TransferSelectionDialog()
  52. {
  53. TransferSelectionViewModel = new TransferSelectionViewModel();
  54. TransferSelectionViewModel.EnableTimer(true);
  55. Thread.Sleep(1000);
  56. InitializeComponent();
  57. DataContext = TransferSelectionViewModel;
  58. OriginalFoupItem.Slots = TransferSelectionViewModel.FoupAWaferInfo;
  59. OriginalFoupItem.ShowSlotsIndex = Visibility.Visible;
  60. DestinationFoupItem.Slots = TransferSelectionViewModel.FoupBWaferInfo;
  61. DestinationFoupItem.ShowSlotsIndex = Visibility.Visible;
  62. TransferSelectionViewModel.MyTransferSelectionDialog = this;
  63. }
  64. private void Window_Closed(object sender, EventArgs e)
  65. {
  66. OriginalFoupItem.ShowSlotsIndex = Visibility.Collapsed;
  67. DestinationFoupItem.ShowSlotsIndex = Visibility.Collapsed;
  68. }
  69. }
  70. }