终端一体化运控平台
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

InternetInfo.cs 2.0 KiB

2 anni fa
2 anni fa
2 anni fa
2 anni fa
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. /// <summary>
  52. /// 是否启用测试模式
  53. /// </summary>
  54. public static bool IsEnableTest { get; set; }
  55. /// <summary>
  56. /// 大屏地址
  57. /// </summary>
  58. public static string DataVApiAddress { get; set; }
  59. /// <summary>
  60. /// 大屏主题
  61. /// </summary>
  62. public static string BroadcastPubTopic { get; set; }
  63. /// <summary>
  64. /// 物料管理地址
  65. /// </summary>
  66. public static string WebServiceUri { get; set; }
  67. #endregion
  68. }
  69. }