SystemInf.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using System;
  2. using System.Collections.Generic;
  3. namespace UAS_MES_NEW.Entity
  4. {
  5. class SystemInf
  6. {
  7. /// <summary>
  8. /// 连接字符串,用户登录的时候选择了数据库之后会使用该字符串作为连接字符串
  9. /// </summary>
  10. public static string ConnectionString;
  11. /// <summary>
  12. /// 用户登录的时间
  13. /// </summary>
  14. public static string LoginTime;
  15. /// <summary>
  16. /// 当前的连接数据库
  17. /// </summary>
  18. public static string CurrentDB;
  19. /// <summary>
  20. /// 配置文件默认的数据库
  21. /// </summary>
  22. public static string DefaultDB;
  23. /// <summary>
  24. /// 屏幕的宽度
  25. /// </summary>
  26. public static int ScreenWidth;
  27. /// <summary>
  28. /// 屏幕的高度
  29. /// </summary>
  30. public static int ScreenHeight;
  31. /// <summary>
  32. /// 当前岗位资源对应的Caller
  33. /// </summary>
  34. public static Dictionary<string, Dictionary<string, bool>> Caller = new Dictionary<string, Dictionary<string, bool>>();
  35. /// <summary>
  36. /// 打开的串口的名称
  37. /// </summary>
  38. public static List<string> OpenPort = new List<string>();
  39. /// <summary>
  40. /// 检测音频是否可用
  41. /// </summary>
  42. public static bool CheckAudioEnable = true;
  43. /// <summary>
  44. /// 导航宽度
  45. /// </summary>
  46. public static int NavWidth = 0;
  47. /// <summary>
  48. /// HeadBar的高度
  49. /// </summary>
  50. public static int HeadBarHeight = 0;
  51. /// <summary>
  52. /// 当前程序进程ID
  53. /// </summary>
  54. public static int ProcessesID;
  55. /// <summary>
  56. /// 是否允许打印程序
  57. /// </summary>
  58. public static bool EnablePrint;
  59. public static string IP;
  60. /// <summary>
  61. /// 缓存数据的文件夹
  62. /// </summary>
  63. public static string CacheFolder = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\CacheFile\";
  64. /// <summary>
  65. /// 日志文件的缓存路径
  66. /// </summary>
  67. public static string LogFolder = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\Log\";
  68. /// <summary>
  69. /// 缓存的XML文件的路径和名称
  70. /// </summary>
  71. public static string CacheFilePath = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\CacheFile\CacheInfo.xml";
  72. public static bool UpperCollection = true;
  73. public static DataOperate.DataHelper dh;
  74. public static Boolean OpenByNet = false;
  75. }
  76. }