终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

56 rindas
1.6 KiB

  1. using BPASmartClient.DosingSystem.Model;
  2. using BPASmartClient.Helper;
  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.Shapes;
  16. namespace BPASmartClient.DosingSystem.View
  17. {
  18. /// <summary>
  19. /// NewMaterialDeviceParView.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class NewMaterialDeviceParView : Window
  22. {
  23. public NewMaterialDeviceParView()
  24. {
  25. InitializeComponent();
  26. this.MouseLeftButtonDown += (o, e) => { if (e.LeftButton == MouseButtonState.Pressed) this.DragMove(); };
  27. this.DragMove();
  28. }
  29. private void ComboBox_KeyUp(object sender, KeyEventArgs e)
  30. {
  31. var res = sender as ComboBox;
  32. Json<DevicePar>.Read();
  33. if (res.Text != null && res.Text != String.Empty)
  34. {
  35. var datas = Json<DevicePar>.Data.deviceParModels.Where(s => s.MaterialName.Contains(res.Text.Trim()));
  36. if (datas.Count() > 0)
  37. {
  38. res.ItemsSource = datas;
  39. res.IsDropDownOpen = true;
  40. }
  41. else
  42. {
  43. res.IsDropDownOpen = false;
  44. }
  45. }
  46. }
  47. private void ComboBox_LostFocus(object sender, RoutedEventArgs e)
  48. {
  49. }
  50. }
  51. }