You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.7 KiB
C#
50 lines
1.7 KiB
C#
using Aucma.Core.SheetMetal.Common;
|
|
using Aucma.Core.SheetMetal.ViewModels;
|
|
using CommunityToolkit.Mvvm.Messaging;
|
|
using System.Windows;
|
|
using System.Windows.Input;
|
|
|
|
namespace Aucma.Core.SheetMetal.Views
|
|
{
|
|
/// <summary>
|
|
/// SplitPlanView.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class SplitPlanView : Window
|
|
{
|
|
private SplitPlanViewModel planInfoEditViewModel = new SplitPlanViewModel();
|
|
|
|
public SplitPlanView()
|
|
{
|
|
InitializeComponent();
|
|
this.DataContext = planInfoEditViewModel;
|
|
//WeakReferenceMessenger.Default.Register<object>(this,Recive);//消息通知
|
|
}
|
|
|
|
private void Recive(object recipient, object message)
|
|
{
|
|
this.Close();
|
|
}
|
|
|
|
private void dgvMH_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
{
|
|
// 检查是否有单选框被选中
|
|
if (!status1.IsChecked.HasValue || !status2.IsChecked.HasValue || !status3.IsChecked.HasValue ||
|
|
!(status1.IsChecked.Value || status2.IsChecked.Value || status3.IsChecked.Value))
|
|
{
|
|
// 如果没有单选框被选中,则触发提醒弹框
|
|
MessageBox.Show("请至少选择一个执行类型!", "提醒", MessageBoxButton.OK, MessageBoxImage.Warning);
|
|
}
|
|
else
|
|
{
|
|
// 至少有一个单选框被选中,执行正常逻辑
|
|
planInfoEditViewModel.MouseClick(sender);
|
|
}
|
|
}
|
|
|
|
private void queryParam_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
|
{
|
|
CommHelper.OpenOsk();
|
|
}
|
|
}
|
|
}
|