终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

61 rinda
1.5 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Configuration;
  7. using System.IO;
  8. using Microsoft.Extensions.Configuration;
  9. using System.Threading;
  10. using BPASmartClient.Helper;
  11. using BPASmartClient.Message;
  12. using BPA.ApolloClient;
  13. using BPA.ApolloClient.Options;
  14. using Com.Ctrip.Framework.Apollo;
  15. namespace BPASmartClient.Business
  16. {
  17. /// <summary>
  18. /// 网络信息数据
  19. /// </summary>
  20. public class InternetInfo
  21. {
  22. /// <summary>
  23. /// 配置初始化
  24. /// </summary>
  25. public static void InitConfig()
  26. {
  27. NetworkConnectState = UniversalHelper.GetInstance().GetNetworkState();
  28. while (!NetworkConnectState)
  29. {
  30. NetworkConnectState = UniversalHelper.GetInstance().GetNetworkState();
  31. Thread.Sleep(2000);
  32. }
  33. }
  34. /// <summary>
  35. /// 网络连接状态
  36. /// </summary>
  37. public static bool NetworkConnectState { get; set; }
  38. #region API地址
  39. /// <summary>
  40. /// Api 网关地址
  41. /// </summary>
  42. public static string ApiAddress { get; set; }
  43. /// <summary>
  44. /// 订单服务
  45. /// </summary>
  46. public static string OrderServer { get; set; }
  47. /// <summary>
  48. /// 库存服务
  49. /// </summary>
  50. public static string StockServer { get; set; }
  51. #endregion
  52. }
  53. }