using Aucma.Core.OldBoxFoam.Common; using Aucma.Core.OldBoxFoam.ViewModels; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; using System.Windows; using System.Windows.Input; namespace Aucma.Core.OldBoxFoam.Views { /// /// SplitPlanView.xaml 的交互逻辑 /// public partial class SplitPlanView : Window { private SplitPlanViewModel planInfoEditViewModel = null; public SplitPlanView(string objId,int shiftType,string boxType,string spaceCode) { InitializeComponent(); planInfoEditViewModel = new SplitPlanViewModel(objId, shiftType, boxType, spaceCode); this.DataContext = planInfoEditViewModel; WeakReferenceMessenger.Default.Register(this,Recive); } private void Recive(object recipient, object message) { this.Close(); } private void dgvMH_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { planInfoEditViewModel.MouseClick(sender); } private void queryParam_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e) { CommHelper.OpenOsk(); } private void dgvMH_MouseLeftButtonDown_1(object sender, MouseButtonEventArgs e) { planInfoEditViewModel.MouseClick(sender); } private void queryParam_PreviewMouseDoubleClick_1(object sender, MouseButtonEventArgs e) { CommHelper.OpenOsk(); } } }