WaferAssociationUnit.xaml.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using MECF.Framework.Common.DataCenter;
  2. using MECF.Framework.Common.Equipment;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows;
  10. using System.Windows.Controls;
  11. using System.Windows.Data;
  12. using System.Windows.Documents;
  13. using System.Windows.Input;
  14. using System.Windows.Media;
  15. using System.Windows.Media.Imaging;
  16. using System.Windows.Navigation;
  17. using System.Windows.Shapes;
  18. using CyberX8_MainPages.Unity;
  19. namespace CyberX8_MainPages.Views
  20. {
  21. /// <summary>
  22. /// WaferAssociationUnit.xaml 的交互逻辑
  23. /// </summary>
  24. public partial class WaferAssociationUnit : UserControl
  25. {
  26. public WaferAssociationUnit()
  27. {
  28. InitializeComponent();
  29. }
  30. public WaferAssociationInfo WAInfo
  31. {
  32. get { return (WaferAssociationInfo)GetValue(WAInfoProperty); }
  33. set { SetValue(WAInfoProperty, value); }
  34. }
  35. public static readonly DependencyProperty WAInfoProperty = DependencyProperty.Register("WAInfo", typeof(WaferAssociationInfo), typeof(WaferAssociationUnit));
  36. private void cb_DropDownOpened(object sender, EventArgs e)
  37. {
  38. cb.ItemsSource= GetFilesNames(System.IO.Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", "Sequence")).ToList();
  39. }
  40. private IEnumerable<string> GetFilesNames(string path)
  41. {
  42. return Directory.GetFiles(path, "*.seq")
  43. .Select(System.IO.Path.GetFileNameWithoutExtension);
  44. }
  45. private void cb_SelectionChanged(object sender, SelectionChangedEventArgs e)
  46. {
  47. WAInfo.SequenceName = cb.SelectedValue.ToString();
  48. }
  49. }
  50. }