TimeoutValues.cs 5.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 = GenericSinochemEpsApp.AppSettings["__FP_Idle"];
  36. public static readonly string Shared_AuthorizePump = GenericSinochemEpsApp.AppSettings["__FP_Shared_AuthorizePump"];
  37. public static readonly string Shared_WaitForPayableTrx = GenericSinochemEpsApp.AppSettings["__FP_Shared_WaitForPayableTrx"];
  38. public static readonly string Shared_NotifyPOS = GenericSinochemEpsApp.AppSettings["__FP_Shared_NotifyPOS"];
  39. public static readonly string Shared_PayTrx = GenericSinochemEpsApp.AppSettings["__FP_Shared_PayTrx"];
  40. public static readonly string Shared_WaitForFueling = GenericSinochemEpsApp.AppSettings["__FP_Shared_WaitForFueling"];
  41. public static readonly string __FP_Shared_AuthorizePump_ClearLastTrx = GenericSinochemEpsApp.AppSettings["__FP_Shared_AuthorizePump_ClearLastTrx"];
  42. public static readonly string CarPlateMode_CalculateMAC = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_CalculateMAC"];
  43. public static readonly string CarPlateMode_DisableICCardReader = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_DisableICCardReader"];
  44. public static readonly string CarPlateMode_Error = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_Error"];
  45. public static readonly string CarPlateMode_OpenCardReader = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_OpenCardReader"];
  46. public static readonly string CarPlateMode_SendPaymentResult = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_SendPaymentResult"];
  47. public static readonly string CarPlateMode_SendTrxDoneToCardReader = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_SendTrxDoneToCardReader"];
  48. public static readonly string CarPlateMode_SendTrxListFillingPaid = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_SendTrxListFillingPaid"];
  49. public static readonly string CarPlateMode_SendWelcomeScreen = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_SendWelcomeScreen"];
  50. public static readonly string CarPlateMode_ShowTrxListFueling = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_ShowTrxListFueling"];
  51. public static readonly string CarPlateMode_ShowTrxListPendingFueling = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_ShowTrxListPendingFueling"];
  52. public static readonly string CarPlateMode_ShowTrxListReadyForPay = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_ShowTrxListReadyForPay"];
  53. public static readonly string CarPlateMode_WaitForCardReaderBackToIdle = GenericSinochemEpsApp.AppSettings["__FP_CarPlateMode_WaitForCardReaderBackToIdle"];
  54. public static readonly string ICCardMode_AbortTransaction = GenericSinochemEpsApp.AppSettings["__FP_ICCardMode_AbortTransaction"];
  55. public static readonly string ICCardMode_CheckCardBalance = GenericSinochemEpsApp.AppSettings["__FP_ICCardMode_CheckCardBalance"];
  56. public static readonly string ICCardMode_HandleExternalCheckFailure = GenericSinochemEpsApp.AppSettings["__FP_ICCardMode_HandleExternalCheckFailure"];
  57. public static readonly string ICCardMode_HandleUserTimeout = GenericSinochemEpsApp.AppSettings["__FP_ICCardMode_HandleUserTimeout"];
  58. public static readonly string ICCardMode_SendCalculateMacRequest = GenericSinochemEpsApp.AppSettings["__FP_ICCardMode_SendCalculateMacRequest"];
  59. public static readonly string ICCardMode_SendCardBalanceToCardReader = GenericSinochemEpsApp.AppSettings["__FP_ICCardMode_SendCardBalanceToCardReader"];
  60. public static readonly string ICCardMode_SendPaymentResult = GenericSinochemEpsApp.AppSettings["__FP_ICCardMode_SendPaymentResult"];
  61. public static readonly string ICCardMode_SendTrxDoneToCardReader = GenericSinochemEpsApp.AppSettings["__FP_ICCardMode_SendTrxDoneToCardReader"];
  62. public static readonly string ICCardMode_WaitForCardData = GenericSinochemEpsApp.AppSettings["__FP_ICCardMode_WaitForCardData"];
  63. public static readonly string ICCardMode_WaitForCardEject = GenericSinochemEpsApp.AppSettings["__FP_ICCardMode_WaitForCardEject"];
  64. public static readonly string ICCardMode_WaitForMacData = GenericSinochemEpsApp.AppSettings["__FP_ICCardMode_WaitForMacData"];
  65. }
  66. public static class EpsTrxCleanup
  67. {
  68. public static readonly string WaitForWork = GenericSinochemEpsApp.AppSettings["__ETC_WaitForWork"];
  69. }
  70. public static class Misc
  71. {
  72. public static readonly string BigScreenBackToIdle = GenericSinochemEpsApp.AppSettings["__Misc_BigScreenBackToIdle"];
  73. }
  74. }
  75. }