TimeoutValues.cs 5.2 KB

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