TimeoutValues.cs 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Configuration;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace SinochemInternetPlusApp
  8. {
  9. static class TimeoutValues
  10. {
  11. public static int GetValueInMilliSec(string strValueInSec, int defaultValueInSec)
  12. {
  13. try
  14. {
  15. return int.Parse(strValueInSec) * 1000;
  16. }
  17. catch(Exception ex)
  18. {
  19. return defaultValueInSec * 1000;
  20. }
  21. }
  22. public static int GetValueInSec(string strValueInSec, int defaultValueInSec)
  23. {
  24. try
  25. {
  26. return int.Parse(strValueInSec);
  27. }
  28. catch (Exception ex)
  29. {
  30. return defaultValueInSec;
  31. }
  32. }
  33. public static class FuelingPoint
  34. {
  35. public static readonly string Idle = App.AppSettings["__FP_Idle"];
  36. public static readonly string Shared_AuthorizePump = App.AppSettings["__FP_Shared_AuthorizePump"];
  37. public static readonly string Shared_WaitForPayableTrx = App.AppSettings["__FP_Shared_WaitForPayableTrx"];
  38. public static readonly string Shared_NotifyPOS = App.AppSettings["__FP_Shared_NotifyPOS"];
  39. public static readonly string Shared_PayTrx = App.AppSettings["__FP_Shared_PayTrx"];
  40. public static readonly string Shared_WaitForFueling = App.AppSettings["__FP_Shared_WaitForFueling"];
  41. public static readonly string CarPlateMode_CalculateMAC = App.AppSettings["__FP_CarPlateMode_CalculateMAC"];
  42. public static readonly string CarPlateMode_DisableICCardReader = App.AppSettings["__FP_CarPlateMode_DisableICCardReader"];
  43. public static readonly string CarPlateMode_Error = App.AppSettings["__FP_CarPlateMode_Error"];
  44. public static readonly string CarPlateMode_OpenCardReader = App.AppSettings["__FP_CarPlateMode_OpenCardReader"];
  45. public static readonly string CarPlateMode_SendPaymentResult = App.AppSettings["__FP_CarPlateMode_SendPaymentResult"];
  46. public static readonly string CarPlateMode_SendTrxDoneToCardReader = App.AppSettings["__FP_CarPlateMode_SendTrxDoneToCardReader"];
  47. public static readonly string CarPlateMode_SendTrxListFillingPaid = App.AppSettings["__FP_CarPlateMode_SendTrxListFillingPaid"];
  48. public static readonly string CarPlateMode_SendWelcomeScreen = App.AppSettings["__FP_CarPlateMode_SendWelcomeScreen"];
  49. public static readonly string CarPlateMode_ShowTrxListFueling = App.AppSettings["__FP_CarPlateMode_ShowTrxListFueling"];
  50. public static readonly string CarPlateMode_ShowTrxListPendingFueling = App.AppSettings["__FP_CarPlateMode_ShowTrxListPendingFueling"];
  51. public static readonly string CarPlateMode_ShowTrxListReadyForPay = App.AppSettings["__FP_CarPlateMode_ShowTrxListReadyForPay"];
  52. public static readonly string CarPlateMode_WaitForCardReaderBackToIdle = App.AppSettings["__FP_CarPlateMode_WaitForCardReaderBackToIdle"];
  53. public static readonly string ICCardMode_AbortTransaction = App.AppSettings["__FP_ICCardMode_AbortTransaction"];
  54. public static readonly string ICCardMode_CheckCardBalance = App.AppSettings["__FP_ICCardMode_CheckCardBalance"];
  55. public static readonly string ICCardMode_HandleExternalCheckFailure = App.AppSettings["__FP_ICCardMode_HandleExternalCheckFailure"];
  56. public static readonly string ICCardMode_HandleUserTimeout = App.AppSettings["__FP_ICCardMode_HandleUserTimeout"];
  57. public static readonly string ICCardMode_SendCalculateMacRequest = App.AppSettings["__FP_ICCardMode_SendCalculateMacRequest"];
  58. public static readonly string ICCardMode_SendCardBalanceToCardReader = App.AppSettings["__FP_ICCardMode_SendCardBalanceToCardReader"];
  59. public static readonly string ICCardMode_SendPaymentResult = App.AppSettings["__FP_ICCardMode_SendPaymentResult"];
  60. public static readonly string ICCardMode_SendTrxDoneToCardReader = App.AppSettings["__FP_ICCardMode_SendTrxDoneToCardReader"];
  61. public static readonly string ICCardMode_WaitForCardData = App.AppSettings["__FP_ICCardMode_WaitForCardData"];
  62. public static readonly string ICCardMode_WaitForCardEject = App.AppSettings["__FP_ICCardMode_WaitForCardEject"];
  63. public static readonly string ICCardMode_WaitForMacData = App.AppSettings["__FP_ICCardMode_WaitForMacData"];
  64. }
  65. public static class EpsTrxCleanup
  66. {
  67. public static readonly string WaitForWork = App.AppSettings["__ETC_WaitForWork"];
  68. }
  69. public static class Misc
  70. {
  71. public static readonly string BigScreenBackToIdle = App.AppSettings["__Misc_BigScreenBackToIdle"];
  72. }
  73. }
  74. }