还空瓶弹窗添加延时
This commit is contained in:
parent
aadc0be0ab
commit
20fd5a2e57
|
@ -279,6 +279,8 @@ namespace DM_Weight
|
|||
containerRegistry.RegisterForNavigation<AccountWindow,AccountWindowViewModel>();
|
||||
//账册服务类
|
||||
containerRegistry.Register<MachineRecordService>();
|
||||
|
||||
containerRegistry.RegisterForNavigation<EmptyWindow, EmptyWindowViewModel>();
|
||||
}
|
||||
|
||||
private void PrismApplication_Startup(object sender, StartupEventArgs e)
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DM_Weight.ViewModels
|
||||
{
|
||||
internal class EmptyWindowViewModel
|
||||
{
|
||||
}
|
||||
}
|
|
@ -220,7 +220,6 @@ namespace DM_Weight.ViewModels
|
|||
{
|
||||
get => new DelegateCommand(() =>
|
||||
{
|
||||
|
||||
if (MachineRecords != null && MachineRecords.Count>0)
|
||||
{
|
||||
MachineRecords = MachineRecords.Select(x =>
|
||||
|
@ -228,6 +227,7 @@ namespace DM_Weight.ViewModels
|
|||
if (x.Id == _MachineRecord.Id)
|
||||
{
|
||||
x.IsSelected = !x.IsSelected;
|
||||
CheckboxChecked();
|
||||
}
|
||||
return x;
|
||||
}).ToList();
|
||||
|
|
|
@ -44,11 +44,13 @@ namespace DM_Weight.ViewModels
|
|||
//this.SqlSugarHelper.Db = sqlSugarScope;
|
||||
}
|
||||
|
||||
public DelegateCommand RowSelected
|
||||
public DelegateCommand RowSelected
|
||||
{
|
||||
get => new DelegateCommand(() =>
|
||||
get => new DelegateCommand(async () =>
|
||||
{
|
||||
|
||||
|
||||
// 此处延时1毫秒,等待页面渲染(规避工控机上手指点击弹出的页面上的按钮无效问题)
|
||||
await Task.Delay(TimeSpan.FromMilliseconds(1));
|
||||
if (Channel != null &&string.IsNullOrEmpty(Channel.DrugId))
|
||||
{
|
||||
DialogParameters dialogParameters = new DialogParameters();
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
<GridViewColumn Header="选择" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding IsSelected}" Click="CheckBox_Click" />
|
||||
<CheckBox IsChecked="{Binding IsSelected}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
|
|
@ -22,16 +22,16 @@ namespace DM_Weight.Views.Dialog
|
|||
/// </summary>
|
||||
public partial class ReturnEmptyDialog : UserControl
|
||||
{
|
||||
IEventAggregator _eventAggregator;
|
||||
//IEventAggregator _eventAggregator;
|
||||
public ReturnEmptyDialog(IEventAggregator eventAggregator)
|
||||
{
|
||||
InitializeComponent();
|
||||
this._eventAggregator= eventAggregator;
|
||||
//this._eventAggregator= eventAggregator;
|
||||
}
|
||||
|
||||
private void CheckBox_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_eventAggregator.GetEvent<CheckBoxCheckEvent>().Publish();
|
||||
}
|
||||
//private void CheckBox_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// _eventAggregator.GetEvent<CheckBoxCheckEvent>().Publish();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<UserControl x:Class="DM_Weight.Views.EmptyWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:DM_Weight.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -0,0 +1,28 @@
|
|||
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;
|
||||
|
||||
namespace DM_Weight.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// EmptyWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class EmptyWindow : UserControl
|
||||
{
|
||||
public EmptyWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue