|
- using BPASmartClient.DosingSystem.Model;
- using BPASmartClient.Helper;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Shapes;
-
- namespace BPASmartClient.DosingSystem.View
- {
- /// <summary>
- /// NewMaterialDeviceParView.xaml 的交互逻辑
- /// </summary>
- public partial class NewMaterialDeviceParView : Window
- {
- public NewMaterialDeviceParView()
- {
- InitializeComponent();
- this.MouseLeftButtonDown += (o, e) => { if (e.LeftButton == MouseButtonState.Pressed) this.DragMove(); };
- this.DragMove();
- }
-
- private void ComboBox_KeyUp(object sender, KeyEventArgs e)
- {
- var res = sender as ComboBox;
- Json<DevicePar>.Read();
- if (res.Text != null && res.Text != String.Empty)
- {
- var datas = Json<DevicePar>.Data.deviceParModels.Where(s => s.MaterialName.Contains(res.Text.Trim()));
- if (datas.Count() > 0)
- {
- res.ItemsSource = datas;
- res.IsDropDownOpen = true;
- }
- else
- {
- res.IsDropDownOpen = false;
- }
- }
- }
-
- private void ComboBox_LostFocus(object sender, RoutedEventArgs e)
- {
-
- }
- }
- }
|