예제 #1
0
        public bool IsCashDatasetValid()
        {
            bool result = false;

            if (CashIn != null)
            {
                result = CashIn.IsDataSetValid();
            }
            return(result);
        }
예제 #2
0
        public void InitializeCashIn()
        {
            Log.Debug("Init cashin");

            if (!TurnOffCashInInit)
            {
                try
                {
                    cashin = GetCashInManagerInstance();

                    if (CashIn != null && !CashIn.IsDataSetValid())
                    {
                        CashinOK = false;
                        Log.Info("Cash validator dataset is invalid!");
                        throw new CashinDatasetException("Cash validator dataset is invalid!");
                    }
                    if (CashIn != null && !CashIn.AceptorsFound)
                    {
                        Log.Error("Cash validators are not found! Geldschein- und Münzprüfer nicht gefunden", new Exception());
                        CashinOK = false;
                        if (!CashinOK)
                        {
                            AsyncConnectCashin();
                            if (!System.Diagnostics.Debugger.IsAttached)
                            {
                                throw new CashinException("Cashin is not working!");
                            }
                        }
                    }
                    else
                    {
                        CashinOK = true;
                        //  AssignCashInEventEx();
                    }
                }
                catch (CashinException e)
                {
                    throw;
                }
                catch (CashinDatasetException e)
                {
                    throw;
                }
                catch (Exception ex)
                {
                    Log.Error("Error initialising Cash-Hardware", ex);
                }
            }
        }