Files
DE70/.svn/pristine/2e/2e67fa142d2d90139818d36b4d1063e0f8523a41.svn-base
T
2024-09-02 10:03:23 +07:00

68 lines
2.0 KiB
Plaintext

using DE70_CMDv2;
using SafeBagDE70.Services;
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 SafeBagDE70
{
/// <summary>
/// Interaction logic for CollectionUC.xaml
/// </summary>
public partial class InformationUC : UserControl
{
private bool _bContinue = false;
private bool _bPlaySound = false;
private List<Control> _controls = null;
public InformationUC()
{
InitializeComponent();
}
public void ShowInfor(string strInfor, bool bContinue = false, bool bPlaySound=true,List<Control> controls=null)
{
lblInfor.Text = strInfor;
_bContinue = bContinue;
_bPlaySound = bPlaySound;
_controls = controls;
if (_bPlaySound)
SoundManager.StartWarningSound();
}
private void btnEnd_Click(object sender, RoutedEventArgs e)
{
if(_controls!=null)
{
foreach (var item in _controls)
{
item.IsEnabled = true;
}
}
if(_bContinue)
((MainWindow)Application.Current.MainWindow).ShowDepositScreen(false);
else
((MainWindow)Application.Current.MainWindow).ShowWelcomeScreen();
SoundManager.StopWarningSound();
}
private void btnCancel_Click(object sender, RoutedEventArgs e)
{
if (AppData.cCmdRsp != null)
AppData.cCmdRsp.SendXXCmd((byte)Command.CMD_DE_CANCEL);
SoundManager.StopWarningSound();
}
}
}