终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

81 line
1.9 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 BPA.Helper;
  11. using BPA.ApolloClient;
  12. using BPA.ApolloClient.Options;
  13. using Com.Ctrip.Framework.Apollo;
  14. namespace BPASmartClient.Business
  15. {
  16. /// <summary>
  17. /// 网络信息数据
  18. /// </summary>
  19. public class InternetInfo
  20. {
  21. /// <summary>
  22. /// 配置初始化
  23. /// </summary>
  24. public static void InitConfig()
  25. {
  26. NetworkConnectState = UniversalHelper.GetInstance.GetNetworkState();
  27. while (!NetworkConnectState)
  28. {
  29. NetworkConnectState = UniversalHelper.GetInstance.GetNetworkState();
  30. Thread.Sleep(2000);
  31. }
  32. }
  33. /// <summary>
  34. /// 网络连接状态
  35. /// </summary>
  36. public static bool NetworkConnectState { get; set; }
  37. #region API地址
  38. /// <summary>
  39. /// Api 网关地址
  40. /// </summary>
  41. public static string ApiAddress { get; set; }
  42. /// <summary>
  43. /// 订单服务
  44. /// </summary>
  45. public static string OrderServer { get; set; }
  46. /// <summary>
  47. /// 库存服务
  48. /// </summary>
  49. public static string StockServer { get; set; }
  50. /// <summary>
  51. /// 是否启用测试模式
  52. /// </summary>
  53. public static bool IsEnableTest { get; set; }
  54. /// <summary>
  55. /// 大屏地址
  56. /// </summary>
  57. public static string DataVApiAddress { get; set; }
  58. /// <summary>
  59. /// 大屏主题
  60. /// </summary>
  61. public static string BroadcastPubTopic { get; set; }
  62. /// <summary>
  63. /// 物料管理地址
  64. /// </summary>
  65. public static string WebServiceUri { get; set; }
  66. #endregion
  67. }
  68. }