Exemple #1
0
 private void CloseDevices()
 {
     try
     {
         if (this.m_ApplicationType.ToUpper() == "TOUCHPARK")
         {
             if (Devices.CardDevice != null)
             {
                 Devices.CardDevice.CloseConnection();
             }
             if (Devices.CoinMechanism == null)
             {
                 return;
             }
             Devices.CoinMechanism = (CoinMechanism)null;
         }
         else
         {
             Devices.CoinMechanism = (CoinMechanism) new SimulatedCoinMechanism();
         }
     }
     catch (CashDeviceCouldNotBeFoundException ex)
     {
         Log.Write((Exception)ex);
         OutOfOrderForm outOfOrderForm = new OutOfOrderForm();
         outOfOrderForm.Refresh();
         Application.DoEvents();
         int num = (int)outOfOrderForm.ShowDialog();
     }
 }
Exemple #2
0
 private void CoinMechanismSetup()
 {
     try
     {
         if (Devices.CoinMechanism == null)
         {
             Devices.CoinMechanism = new CoinMechanism();
         }
         Devices.CoinMechanism.CollectOnTimeout = true;
         Devices.CoinMechanism.RejectOnTimeOut  = true;
         Devices.CoinMechanism.TimeOut          = new TimeSpan(0, 0, 9);
         Devices.CoinMechanism.ExpectedCash     = this._parkingPermitInfo.Amount;
         this.AttachCoinMechanismEventDelegates();
     }
     catch (Exception ex)
     {
         OutOfOrderForm outOfOrderForm = new OutOfOrderForm(true);
     }
 }
Exemple #3
0
 private void OpenDevices()
 {
     try
     {
         if (this.m_ApplicationType.ToUpper() == "TOUCHPARK")
         {
             this.UseWaitCursor = true;
             string text = this.messageButton.Text;
             this.messageButton.Text = "Initialising Payment Devices, Please Wait...";
             this.Refresh();
             Application.DoEvents();
             Devices.CoinMechanism = !Settings.Default.CoinMachineIsSimulated ? new CoinMechanism() : (CoinMechanism) new SimulatedCoinMechanism();
             if (Settings.Default.CardDeviceEnabled)
             {
                 Devices.CardDevice = new CardDevice();
                 Devices.CardDevice.DisplayWelcomeScreenMessage(Settings.Default.CardDeviceWelcomeMessage);
             }
             this.messageButton.Text = text;
             this.Refresh();
             Application.DoEvents();
             this.UseWaitCursor = false;
         }
         else
         {
             Devices.CoinMechanism = (CoinMechanism) new SimulatedCoinMechanism();
         }
     }
     catch (CashDeviceCouldNotBeFoundException ex)
     {
         Log.Write((Exception)ex);
         OutOfOrderForm outOfOrderForm = new OutOfOrderForm();
         outOfOrderForm.Refresh();
         Application.DoEvents();
         int num = (int)outOfOrderForm.ShowDialog();
     }
 }