71 lines
2.1 KiB
Plaintext
71 lines
2.1 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);
|
|
((MainWindow)Application.Current.MainWindow).ResetTimers();
|
|
}
|
|
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();
|
|
}
|
|
}
|
|
}
|