2023-11-14 14:49:22 +08:00
|
|
|
|
using DM_Weight.ViewModels;
|
|
|
|
|
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.Navigation;
|
|
|
|
|
using System.Windows.Shapes;
|
|
|
|
|
|
2024-08-07 09:45:18 +08:00
|
|
|
|
namespace DM_Weight.Views
|
2023-11-14 14:49:22 +08:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2024-08-07 09:45:18 +08:00
|
|
|
|
/// BindBoxPackageWindow.xaml 的交互逻辑
|
2023-11-14 14:49:22 +08:00
|
|
|
|
/// </summary>
|
2024-08-07 09:45:18 +08:00
|
|
|
|
public partial class BindBoxPackageWindow : UserControl
|
2023-11-14 14:49:22 +08:00
|
|
|
|
{
|
2024-08-07 09:45:18 +08:00
|
|
|
|
|
|
|
|
|
BindBoxPackageWindowViewModel vms;
|
|
|
|
|
public BindBoxPackageWindow()
|
2023-11-14 14:49:22 +08:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2024-08-07 09:45:18 +08:00
|
|
|
|
|
|
|
|
|
vms = BindBoxPackageWindowViewModel.vm;
|
2023-11-14 14:49:22 +08:00
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 药品名称触发事件
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
private void ComboBox_KeyUp(object sender, KeyEventArgs e)
|
2024-11-05 10:14:28 +08:00
|
|
|
|
{
|
2023-11-14 14:49:22 +08:00
|
|
|
|
ComboBox comboBox = sender as ComboBox;
|
|
|
|
|
vms.UpdateComboBoxItems(comboBox.Text);
|
|
|
|
|
if (this.vms.DrugInfos.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
comboBox.IsDropDownOpen = true;
|
|
|
|
|
}
|
|
|
|
|
TextBox textBox = (TextBox)comboBox.Template.FindName("PART_EditableTextBox", comboBox);
|
|
|
|
|
textBox.SelectionStart = textBox.Text.Length;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|