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 { /// /// Interaction logic for CollectionUC.xaml /// public partial class InformationUC : UserControl { private bool _bContinue = false; private bool _bPlaySound = false; private List _controls = null; public InformationUC() { InitializeComponent(); } public void ShowInfor(string strInfor, bool bContinue = false, bool bPlaySound=true,List 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(); } } }